st-label: Move St-specific shadow processing out of the paint vfunc (#8588)
* st-label: Revert changes from 37d75d48e4f0214e498dd559ee257946ad3fed6f
* Avoid a function call during paint
Also not NULL'ing it because it gets re-assigned.
* Simplify expressions
This would need strict comparison if we were adding an incompatible type
to the expression.
* Remove another function call from StLabel's paint vfunc
* Move StWidgetPrivate to st-private.h so it can be used in st-label.c
* st-label: Move St-specific shadow processing out of the paint vfunc
We are fetching the theme node and shadow object on paint - both heavy
calls. That is our only way of knowing if we should process text
shadows. Very few labels actually make use of this feature in Cinnamon,
so move it to the allocate vfunc, which will get called less but after
any style change. We can only know from both the style change and
allocate vfuncs if the style has actually changed by checking
`is_style_dirty` on StWidgetPrivate. The alternative is to change the
public API which will break things. This is better long-term because
many internal St methods are reusing StWidget's public API when they
don't need to.
This also removes the type cast instance checks in touched methods
because buried in the layers of macros is a call to
`g_type_check_instance_cast` in GLib, which will incur a performance
penalty. We don't need to worry about type checking at runtime in
internal vfuncs.
- Prevent any scrolling from occuring if the selected item is fully
within the viewport.
- Add some overscroll for padding (having the selected icon right up
against the edge of the view doesn't look very good).
- Simplify some of the calculations.
SettingsWidgets: Convert to use the new style used in xapps (#8577)
This converts everything except the desktop settings to the mew style used
in python-xapps. The desktop settings have to be adjusted in Nemo. A few
changes in spacing were made to make this work better in cinnamon settings.
780b2b1...
by
Clement Lefebvre <email address hidden>
workspace-switcher applet: Fix updating the focus window position and
size at startup, and ensure the focus window starts out on top of the
graph button.
The repaint function for workspace graph buttons was relying on the
last user time for each window to sort them, and this seems to be
not entirely reliable. Just make sure to always paint the focused
window's rectangle last.
The _createButtons methods was disconnecting all signals before re-
connecting the focus-changed handler. If _onFocusChanged returned
early (because the focus window stayed the same) the move and resize
handlers wouldn't be reconnected. Since these three handlers are the
only ones the signal manager is keeping track of, just selectively
disconnect instead of disconnecting all.
cinnamon-settings-ui: Remove the hack to center the stack switcher (#8520)
When the back button is hidden the hack we used to center the stack switcher
stops it from being centered. Nowadays we have gtk_box_set_center_widget().
Use that instead so the stack switcher is always centered correctly.