Commit graph

53 commits

Author SHA1 Message Date
Ian Douglas Scott
fe0e4bf409 status-area: Use ItemIsMenu correctly
The comment that was previously here assumed that `ItemIsMenu` should be
defined for any status item that has a menu, but the FreeDesktop spec
rather defines it as an item that "only supports the context menu", so
we should open the menu instead of trying to call `Activate`.

This change won't affect behavior if `ItemIsMenu` is true, but `Activate`
errors, except by opening the menu without having to wait for that
errror first. It will fix the left click to open menu behavior if any
client defines that method to not error, but does set `ItemIsMenu`.
2026-02-02 10:34:25 -08:00
Ian Douglas Scott
c24b769acd status-area: Move duplicated code to an activate function 2026-02-02 10:34:25 -08:00
Ian Douglas Scott
468017654c status-area: Don't try to call activate() in status_menu
This was added in https://github.com/pop-os/cosmic-applets/pull/1143,
but I don't think this code will ever be reached? This code is called
when activating an item in a menu, so it should only apply when there is
a menu.
2026-02-02 10:34:25 -08:00
Ian Douglas Scott
ebe18a17c5 status-area: Disable buttons when not enabled in DBusMenu 2026-02-02 10:34:25 -08:00
Michael Aaron Murphy
44ec34f6aa fix(status-area): reducing padding to fix missing icon buttons 2026-01-13 15:33:04 -05:00
Michael Aaron Murphy
6ab2aeca2b fix(status-area): add fallback for icon lookup by name 2026-01-13 15:33:04 -05:00
Michael Aaron Murphy
290439b9b9 fix(status-area): use panel icon button logic for consistency 2026-01-13 15:33:04 -05:00
Michael Aaron Murphy
f06c6a0b80 chore: update dependencies and debian changelog 2026-01-13 15:33:04 -05:00
Ashley Wulber
2852f3cc16 fix: status area positioning 2025-12-30 15:58:12 -05:00
夜未央,天将亮
9db4ebdc2d
fix(status-area): implement activate on left-click with menu fallback 2025-12-30 08:27:24 +01:00
Ian Douglas Scott
08c7157555 status-area: Use .svg from IconThemePath if present 2025-12-18 11:41:28 -07:00
Ian Douglas Scott
d04314957b staus-area: Initial support to use IconThemePath for icon loading
We should use a more complicated method to lookup the icon from the
theme, but `cosmic-freedesktop-icons` will need some changes to be able
to accomodate a custom theme path.

This is probably an improvement. Anything that uses `IconThemePath`
is likely not working currently, so it won't make things worse.
2025-12-18 11:41:28 -07:00
Ian Douglas Scott
080f07e0b4 status-area: Factor out duplicated icon button code to function 2025-12-18 11:41:28 -07:00
Ian Douglas Scott
e7e275abf7 status-area: Use struct instead of enum for IconUpdate 2025-12-18 11:41:28 -07:00
Ashley Wulber
836c0e378b applet overlap
chore: mpris dep

fix: dock buttons

improv: battery and audio improvements

feat: overlapping padding

fix: input source text button

fix: apply panel spacing to app tray

chore: update libcosmic

fix: spacing and padding

fix(minimize): hide when empty
2025-11-11 16:49:48 -05:00
Ashley Wulber
b026db6f7c fix(status-area): better handle apps with no menus 2025-11-10 11:50:39 -05:00
Cheong Lau
dd0158d8f0 perf: refactor to reduce memory allocations and cpu work 2025-10-07 17:04:51 +02:00
Cheong Lau
8e0f1c4a09
chore: apply recommendations from clippy 2025-10-04 02:51:18 +02:00
Vukašin Vojinović
2b7b4cba56 chore: update to Rust 2024 edition 2025-08-18 16:44:50 +02:00
Ashley Wulber
a5d813dc9b feat(status-area): provide activation token on menu item activation 2025-08-06 12:52:33 -04:00
Erik W
ac93c41c23 fix(status-area): prevent crash on invalid icon data 2025-06-14 19:02:30 -04:00
Ashley Wulber
942c8397a4 fix(status-area): overflow handling 2025-05-20 17:00:56 +02:00
Ian Douglas Scott
2a939e5a11 status-area: Handle changes to icon properties
It seems status icons, at least some, don't send property change
notifications. So we can't rely on that, and have to disable caching.
And handle the `NewIcon` signal defined in
https://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/StatusNotifierItem

I'm not sure whether or not there's a *good* reason it works this way,
but regardless I see `nm-applet` and `ibus` update their icons as
they should after these changes.
2025-03-17 20:46:08 -07:00
Ashley Wulber
c54ddeb38a chore: udpate libcosmic 2025-03-14 14:26:42 -04:00
Ashley Wulber
61d1d1b91d fix: use fixed window width for all applets 2025-03-14 14:26:42 -04:00
Ashley Wulber
9b09c97665 fix(status arrea): padding 2025-03-14 14:26:42 -04:00
Ashley Wulber
0de336d0d7 update libcosmic: adds tooltip support 2025-03-14 14:26:42 -04:00
Ashley Wulber
09062c10c9 refactor: status area single threaded executor 2024-11-11 11:05:10 -05:00
Ashley Wulber
5b5cd77e7c update iced 2024-10-31 17:52:33 -04:00
LazyTanuki
b41f30e1a1 fix: make overflow button and status area buttons popup on press down instead of on press
leftovers from #568
2024-08-15 17:52:23 +02:00
Vukašin Vojinović
0640e88412 chore: merge imports 2024-07-09 16:26:27 +02:00
Ian Douglas Scott
1eaccc0f24 status-area: Send opened/closed dbus menu events 2024-06-24 13:34:15 -06:00
Ian Douglas Scott
a5dfc883b8 status-area: Call AboutToShow before showing menu
Comments in `gnome-shell-extension-appindicator` indicate this is
necessary for some clients. Checking the return value doesn't seem to
be.

There are more comments about Dropbox; more may be needed to fix it,
which doesn't seem to behave very properly.
2024-06-24 13:34:15 -06:00
Ashley Wulber
37a60b7759
fix(input-sources): text size 2024-05-18 02:01:40 +02:00
Ashley Wulber
3a39874291 fix(status-area): update existing menu if a duplicate is registered 2024-05-14 17:46:36 -04:00
Ashley Wulber
b3440c5834 feat: auto-switch popup for status-area 2024-05-09 16:01:01 +02:00
Michael Aaron Murphy
8527257ddd chore: add SPDX license identifiers 2024-05-06 21:56:50 +02:00
Ashley Wulber
73ae871088 fix(status-area): force size to match symbolic icons 2024-04-30 20:15:07 -04:00
Ashley Wulber
8900b93c85 fix(app-list): padding typo 2024-04-15 23:46:48 -04:00
Ashley Wulber
8bf340aa8e chore: update applet icon sizes 2024-04-15 23:46:48 -04:00
Ian Douglas Scott
56d3a754e2 status-area: Support vertical panel 2024-04-04 13:25:16 +02:00
Ian Douglas Scott
180e75cb9a
status-area: Show icons that have icon_pixmap but not icon_name (#302)
This is at least one of the issue behind
https://github.com/pop-os/cosmic-applets/issues/165. OBS now shows it's
icon instead of an empty space. But the Mattermost flatpak doesn't show
anything. (Is that Flatpak related, or does it not use
`StatusNotifierItem`?)

Requires https://github.com/pop-os/libcosmic/pull/368. Ideally, it
should have some way to choose from multiple icons in memory of
different sizes.
2024-03-27 13:33:37 -07:00
Ashley Wulber
37fd39340b chore: fmt 2024-02-20 10:55:08 -05:00
Ashley Wulber
d17894f94e chore: clippy 2024-02-20 10:55:08 -05:00
Ashley Wulber
f00fd8bc1a chore: update fixes 2024-02-06 16:21:16 -05:00
Ashley Wulber
0ab6f724fb chore: update libcosmic 2024-02-06 16:21:16 -05:00
Ashley Wulber
e5db5ab1dd
chore: update libcosmic (#168) 2023-12-11 14:45:36 -05:00
daniel.eades
aa2d9fe374 add linting CI jobs 2023-11-21 16:59:14 -05:00
daniel.eades
0e28a940da remove needless 'as_deref' 2023-11-16 15:47:20 -05:00
Ashley Wulber
d80a801fe5 refactor: use menu button 2023-10-24 15:34:21 -04:00