fix(app-list): add padding to unpinned app divider
This commit is contained in:
parent
c6291c7c09
commit
84826b36a7
1 changed files with 9 additions and 4 deletions
|
|
@ -613,7 +613,7 @@ where
|
||||||
pub fn menu_control_padding() -> Padding {
|
pub fn menu_control_padding() -> Padding {
|
||||||
let theme = cosmic::theme::active();
|
let theme = cosmic::theme::active();
|
||||||
let cosmic = theme.cosmic();
|
let cosmic = theme.cosmic();
|
||||||
[cosmic.space_xxs(), cosmic.space_m()].into()
|
[cosmic.space_xxs(), cosmic.space_s()].into()
|
||||||
}
|
}
|
||||||
|
|
||||||
impl cosmic::Application for CosmicAppList {
|
impl cosmic::Application for CosmicAppList {
|
||||||
|
|
@ -1415,6 +1415,10 @@ impl cosmic::Application for CosmicAppList {
|
||||||
PanelAnchor::Top | PanelAnchor::Bottom => true,
|
PanelAnchor::Top | PanelAnchor::Bottom => true,
|
||||||
PanelAnchor::Left | PanelAnchor::Right => false,
|
PanelAnchor::Left | PanelAnchor::Right => false,
|
||||||
};
|
};
|
||||||
|
let divider_padding = match self.core.applet.size {
|
||||||
|
Size::PanelSize(PanelSize::XL) | Size::PanelSize(PanelSize::L) | Size::PanelSize(PanelSize::M) => 8,
|
||||||
|
Size::PanelSize(PanelSize::S) | Size::PanelSize(PanelSize::XS) | Size::Hardcoded(_) => 4,
|
||||||
|
};
|
||||||
let (favorite_popup_cutoff, active_popup_cutoff) = self.panel_overflow_lengths();
|
let (favorite_popup_cutoff, active_popup_cutoff) = self.panel_overflow_lengths();
|
||||||
let mut favorite_to_remove = if let Some(cutoff) = favorite_popup_cutoff {
|
let mut favorite_to_remove = if let Some(cutoff) = favorite_popup_cutoff {
|
||||||
if cutoff < self.pinned_list.len() {
|
if cutoff < self.pinned_list.len() {
|
||||||
|
|
@ -1586,7 +1590,7 @@ impl cosmic::Application for CosmicAppList {
|
||||||
Length::Shrink,
|
Length::Shrink,
|
||||||
dnd_listener(row(favorites).spacing(app_icon.icon_spacing)),
|
dnd_listener(row(favorites).spacing(app_icon.icon_spacing)),
|
||||||
row(active).spacing(app_icon.icon_spacing).into(),
|
row(active).spacing(app_icon.icon_spacing).into(),
|
||||||
container(vertical_rule(1)).height(Length::Fill).into(),
|
container(vertical_rule(1)).height(Length::Fill).padding([divider_padding, 0]).into(),
|
||||||
)
|
)
|
||||||
} else {
|
} else {
|
||||||
(
|
(
|
||||||
|
|
@ -1596,6 +1600,7 @@ impl cosmic::Application for CosmicAppList {
|
||||||
column(active).spacing(app_icon.icon_spacing).into(),
|
column(active).spacing(app_icon.icon_spacing).into(),
|
||||||
container(divider::horizontal::default())
|
container(divider::horizontal::default())
|
||||||
.width(Length::Fill)
|
.width(Length::Fill)
|
||||||
|
.padding([0, divider_padding])
|
||||||
.into(),
|
.into(),
|
||||||
)
|
)
|
||||||
};
|
};
|
||||||
|
|
@ -1776,8 +1781,8 @@ impl cosmic::Application for CosmicAppList {
|
||||||
if !toplevels.is_empty() {
|
if !toplevels.is_empty() {
|
||||||
let mut list_col = column![];
|
let mut list_col = column![];
|
||||||
for (handle, info, _) in toplevels {
|
for (handle, info, _) in toplevels {
|
||||||
let title = if info.title.len() > 32 {
|
let title = if info.title.len() > 34 {
|
||||||
format!("{:.30}...", &info.title)
|
format!("{:.32}...", &info.title)
|
||||||
} else {
|
} else {
|
||||||
info.title.clone()
|
info.title.clone()
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue