Update to latest libcosmic/iced
This commit is contained in:
parent
9b98c20da2
commit
e569e14a99
9 changed files with 640 additions and 552 deletions
|
|
@ -66,8 +66,14 @@ where
|
|||
self.elem.as_widget().height()
|
||||
}
|
||||
|
||||
fn layout(&self, renderer: &Renderer, limits: &layout::Limits) -> layout::Node {
|
||||
let node = self.elem.as_widget().layout(renderer, limits);
|
||||
fn layout(
|
||||
&self,
|
||||
state: &mut Tree,
|
||||
renderer: &Renderer,
|
||||
limits: &layout::Limits,
|
||||
) -> layout::Node {
|
||||
let state = &mut state.children[0];
|
||||
let node = self.elem.as_widget().layout(state, renderer, limits);
|
||||
layout::Node::with_children(node.size(), vec![node])
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use std::{
|
|||
use calloop::LoopHandle;
|
||||
use cosmic::{
|
||||
iced::Background,
|
||||
iced_core::{alignment::Horizontal, Length, Rectangle as IcedRectangle},
|
||||
iced_core::{alignment::Horizontal, Length, Pixels, Rectangle as IcedRectangle},
|
||||
iced_widget::{self, horizontal_rule, text::Appearance as TextAppearance, Column, Row},
|
||||
theme,
|
||||
widget::{button, horizontal_space, icon::from_name, text},
|
||||
|
|
@ -395,7 +395,7 @@ impl Program for ContextMenu {
|
|||
if let Some(shortcut) = shortcut.as_ref() {
|
||||
components.push(
|
||||
text(shortcut)
|
||||
.line_height(20.)
|
||||
.line_height(Pixels(20.))
|
||||
.size(14)
|
||||
.horizontal_alignment(Horizontal::Right)
|
||||
.width(Length::Shrink)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue