Skip to content

Conversation

ilya-zlobintsev
Copy link

Closes #735

image

I haven't tested how the applet looks when the GPU selector is visible, as I don't currently have a hybrid graphics system, but it should be fine.

@wiiznokes
Copy link
Contributor

Is it me or the y axis is not centered?

@ilya-zlobintsev
Copy link
Author

I've discovered that this causes the panel to resize when it's in vertical mode, it's probably not something that should be happening due to a widget, will try to check it out later

@ilya-zlobintsev ilya-zlobintsev marked this pull request as draft July 23, 2025 20:26
@al12gamer
Copy link

Looking forward to this

@jordan-bravo
Copy link

I'm looking forward to this as well. @ilya-zlobintsev , is there anything I can do to help this pull request get merged?

@ilya-zlobintsev ilya-zlobintsev marked this pull request as ready for review September 22, 2025 17:49
@ilya-zlobintsev
Copy link
Author

Apologies, I've forgot about this PR as I'm not currently actively using cosmic on my laptop 😅

I've updated it from latest master now and fixed the size/padding, so it doesn't cause any resizing in either horizontal or vertical mode, and looks consistent with other applets.

image

.into(),
PanelAnchor::Top | PanelAnchor::Bottom => Row::with_children(vec![btn, dot])
if is_horizontal {
Row::with_children(vec![btn, dot])
Copy link
Contributor

@Cheong-Lau Cheong-Lau Oct 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤓 if Row::with_children and Column::with_children takes an impl IntoIterator, then the vec! macro isn't really needed, you could just pass the array itself

... 😅 sorry, besides that lgtm, looking forward to seeing this merged

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, I changed it to from_vec instead, since that's what with_children does internally regardless.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to use with_children (since that's used basically everywhere applicable). Just remove the vec!.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: Display battery percentage in the panel
6 participants