Skip to content

PC3/Breeze: more style updates and behavior improvements

Noah Davis requested to merge work/ndavis/plasma-theme-update into master

PC3 Control: use better implicit size calculation

PC3/Breeze radiobutton: improve style

Radiobuttons now have their own graphics with proper pixel alignment, shadows, hover decorations, focus decorations and whatnot. This includes a new theme svg, but there is code to preserve compatibility with themes that don't use the new radiobutton.svg file.

Screenshot_20211021_052209 Screenshot_20211021_052246

PC3/Breeze scrollbar: update style and behavior

NOTE: I realize this is a different size from what we currently have for the QStyle. I'd like to open a discussion about refinements to the scrollbar style.

Scrollbars use a blue ocean style now.

Scrollbars now support using inset to add extra space around the graphics rather than requiring spacing to be built into the graphics. There is code for compatibilty with themes that don't use inset.

There is a hint for whether or not to show a scrollbar separator. I wasn't quite sure how I wanted to implement the optional separator for themes, so I just named it private-hint-show-scrollbar and used a plain Rectangle for the separator. This should at least look correct with Breeze and not affect other Plasma themes.

set a minimum size to keep the graphics looking correct.

set hoverEnabled to interactive to prevent scrollbars that are not interactive from looking interactive.

no need to explicitly set interactive because that's handled automatically by ScrollView when it is not set explicitly.

Removed some old code for making the slider move incrmenetally when clicking on the groove that didn't actually work.

Removed custom graphics for non-interactive scrollbars. It didn't respect the plasma theme (just a Rectangle) and didn't look like anything we had planned for Breeze.

Screenshot_20211021_052758 Screenshot_20211021_052830

PC3/Breeze sliders: add solid background, handle shadow, fix pixel alignment, fix vertical groove height

Also reduce opacity when disabled and use layer.enabled when opacity < 1 so that the background doesn't show through the handle.

Given what I know about QPalette, setting the opacity for the whole control when disabled seems like it should be unnecessary. For now, this is fine since sliders don't normally contain anything besides the groove and handle graphics.

Screenshot_20211021_052919 Screenshot_20211021_053005

NOTE: The testbench I'm using doesn't actually show pressed graphics. The pressed state just makes the shadow disappear. This is the real pressed state:

Screenshot_20211021_055927

@teams/vdg

Button changes

  • Breeze button: Use solid backgrounds for raised button pressed graphics
  • Breeze button: Use more realistic shadow
  • PC3 private/ButtonBackground: reduce opacity when disabled. Also use layer.enabled to keep different elements from showing through each other. -PC3 private/RaisedbuttonBackground: disable shadow when disabled

Screenshot_20211021_053225 Screenshot_20211021_053207

Breeze line: removed built-in blank space, simplify

The built-in blank space made gettin spacing around the separators just right annoying. The separators had a a barely visible bit of background color below them, but that seemed unnecessary. This should now look and work just like Kirigami separators.

Not much of a visible change.

PC3/Breeze progressbar: update style, improve implicit sizing

Also use InOutSine for indeterminite animation easing, Units::humanMoment for duration, disable hover and respect size hint.

InOutSine just seemed a bit less stiff looking than the default linear type.

humanMoment does not scale with the animation speed setting.

There are no hover graphics, so no point in enabling hover.

pc3-progressbar-sine-2021-10-20_11.00.16

PC3 ScrollView: remove ability to show background in onCompleted

It was copied from qqc2-desktop-style, but it's not actually used by anything that uses PC3 ScrollView. It's an ugly workaround and since the background is already just a Rectangle, it's better to just set the background to a rectangle directly instead of setting it in onCompleted, so let's get rid of it.

Edited by Noah Davis

Merge request reports