Repository navigation
Give the round menu buttons a translucent fill - #611
Open
Octopustank wants to merge 1 commit into
Open
Octopustank wants to merge 1 commit into
Octopustank wants to merge 1 commit into
Conversation
Contributor
Author
The theme's .button background is a resolved mix: its foreground at 9% over the popup colour in the dark variant, 12% in the light one. Resolved, that colour stops tracking the surface it was mixed against, so with a translucent popup the three discs stay flat while the controls around them follow the backdrop. Keep the same foreground percentage as an alpha layer instead. Over the popup colour the theme mixes against, it lands on the theme's own value; over any other surface it keeps the same offset, the way the theme's other translucent popup controls already behave. The two variants tint in opposite directions and an extension stylesheet cannot tell which one is loaded, so the class is picked with the shell's own getStyleVariant().
Octopustank
force-pushed
the
fix/round-button-translucent-fill
branch
from
October 20, 2026 14:51
0584a9f to
fb3defa
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
The three round buttons at the bottom of the popup (Refresh, System Monitor,
Preferences) carry the generic
.buttonclass, whose background the shell themeresolves into an opaque colour:
st-mix(#ffffff, #36363a, 9%)in the darkvariant,
st-mix(#222226, #fafafb, 12%)in the light one.That mix is the theme's foreground composited over its own popup colour, and
once resolved it stops tracking that colour. With the stock opaque popup there
is nothing to see. With a translucent one — a see-through shell theme, or a blur
effect such as blur-my-shell's — the controls around these buttons follow the
backdrop while the three discs stay flat, which is what draws the eye.
This is worth fixing now because blur-my-shell 76, which unifies its blur
backends, is published on extensions.gnome.org for GNOME Shell 46 to 51, and its
popup blur is on by default. A blurred, translucent popup is therefore what
those users get out of the box, rather than something only seen on a
development build.
The theme already styles its own popup controls as translucent tints:
.notification-buttonrgba(255, 255, 255, 0.15).modal-dialog-buttonrgba(255, 255, 255, 0.10).toggle-switch(track)rgba(255, 255, 255, 0.15).button/.icon-buttonst-mix(...)— opaque.buttonis the exception among popup controls, and these three are the onlybuttons in the Vitals popup that adopt it.
Change
Keep the theme's expression rather than its resolved result: the same foreground
at the same percentage, as an alpha layer.
.buttonst-mix(#ffffff, #36363a, 9%)rgba(255, 255, 255, 0.09)72— the theme's#48484cst-mix(#222226, #fafafb, 12%)rgba(34, 34, 38, 0.12)224— the theme's#e0e0e1Over the popup colour the theme mixes against, this lands on the theme's own
value. Over any other surface it keeps the same offset, which is how the
theme's translucent controls behave — in the dark variant the disc gets lighter
along with the backdrop instead of staying a flat patch.
The two variants tint in opposite directions, up from
#36363aand down from#fafafb, and an extension stylesheet cannot see which one is loaded: St's CSShas no media queries and no handle on the variant. So
extension.jsadds theclass using
getStyleVariant(), the function the shell itself uses to choosebetween
gnome-shell-dark.cssand-light.css:getStyleVariant()returns'dark','light', or''for a session mode withno colour scheme of its own; every mode the shell ships inherits
prefer-dark. If it ever returns something that matches no class, the buttonskeep the theme's
.buttonfill — the current look — rather than fail.The variant can also change while the session runs: switching between Light and
Dark in Appearance reloads the shell stylesheet without a restart. The class is
therefore reassigned when the menu opens, so the fill follows the switch the
next time the popup is shown.
Hover and active are the theme's
st-lighten(+4%)/st-lighten(+9%)steps(
st-darkenin the light variant) expressed as alpha: 0.14 and 0.20 on top of0.09 in the dark variant, 0.17 and 0.23 on top of 0.12 in the light one. Every
interactive state is restated because the theme's
.button:hover,:activeand:focusoutrank a bare class.:focuskeeps the base fill on purpose: thetheme's accent focus ring is
!importantand still draws, so the ring markskeyboard focus while the fill stays translucent.
Measured with only the stylesheet swapped, same session, popup and backdrop:
11572— 43 darker than the surface: a flat plate128— 13 lighter, in step with the system menu's round buttons (14 on a backdrop of the same tone)236224— 12 darker212— 24 darker, the offset the theme itself uses over its own popupOver the popup colours the theme mixes against, both give the same pixel:
72on
#36363a,224on#fafafb.The same expression holds across shell versions. I resolved the theme's
.buttonfill and popup colour from the compiled stylesheet shipped with GNOMEShell 45, 46, 47, 48, 49 and 50 — extracted from the Fedora package for each
release, so it is what those shells actually load — and the base fill matches
within 1/255 in both variants, the hover and active steps within 2/255 from 46
on. Shell 45 wrote those two steps as a mix toward white rather than as a
lightness step, so there they drift by up to 9/255, visible only while a button
is hovered or pressed.
Screenshots
Evidence is posted in the comments below, as before/after pairs. Each pair was
captured by swapping in exactly one stylesheet state (upstream
mainvs thisbranch) and keeping the same session, popup and backdrop, so the images
correspond to the diff rather than to whatever happened to be loaded at the
time.
Environment: GNOME Shell 50.6; blur-my-shell 76 from extensions.gnome.org, with
popup blur on and
override-backgroundenabled (it owns the popup background).Nothing here depends on a particular blur extension — any translucent popup
background produces the same mismatch.
Related
Follow-up work to #600. The geometry and the layering stay as merged; what
changes is only how the fill is expressed, so a translucent popup no longer
leaves the discs opaque.
#599 reported that these buttons borrow
message-list-clear-button. That borrowis gone, but the other half of the issue still stands: the buttons clash with a
restyled popup, because the class that replaced it,
.button, resolves to anopaque fill. This addresses that half in the form a translucent surface can use.
Notes
stylesheet.csscarries the fills;extension.jspicks the variant class andreapplies it when the menu opens. No schema, prefs or locale changes, and no
version bump (EGO owns submission versioning).
Under the high contrast theme the fill also applies, and is darker than that
theme's own
.button(47 instead of 74 on its#1a1a1apopup). The 1 px insetborder that delineates controls there comes from the theme and is untouched, so
the outline stays the same and only the fill behind it is dimmer.