[vlc-commits] [Git][videolan/vlc][master] 13 commits: qml: rename VLCStyle.theme in VLCStyle.palette
Steve Lhomme (@robUx4)
gitlab at videolan.org
Tue Feb 28 16:22:13 UTC 2023
Steve Lhomme pushed to branch master at VideoLAN / VLC
Commits:
218e0bb5 by Pierre Lamot at 2023-02-28T15:38:29+00:00
qml: rename VLCStyle.theme in VLCStyle.palette
- - - - -
27707e3e by Pierre Lamot at 2023-02-28T15:38:29+00:00
qml: allow to inhibit animation in AnimatedBackground
this allows to avoid transitioning to undefined colors
- - - - -
1cb094ca by Pierre Lamot at 2023-02-28T15:38:29+00:00
qt: change the way system palettes use VLC dark/light variants
- - - - -
b451e973 by Pierre Lamot at 2023-02-28T15:38:29+00:00
qml: introduce ColorContext
System themes are temporary disabled
Theses Contexts defines what palette they use (the standard one of the dark one
in the player), what color set they should use (is it a button, a slider,
etc..), and the state of the widget (hovered, focused, pressed, disabled). The
context defines some color properties that may be usable in the current widgets
(different colors for foregrounds, backgrounds, and decorations)
* For each color, we build a key representing the color, the key is build from
the color set (button, window, view, tabbutton, etc..), the section
(background/foreground), the name (primary/secondary/...) and the state
(normal, hovered, focused, pressed, disabled).
* all colors are stored in a map associating the color key to its value
* When a color is required for a particular context, we look in the table for
the key. There is a fallback mechanism, if the key doesn't exists for a given
state, we try to rebuild the key for the `Normal` state. then if the key
doesn't exist for this component we rebuild the key for the `View` component
(first with the actual state then with the `Normal` State). if every thing
fails we return a crappy color (magenta) to visually indicate that something
needs to be fixed.
* On the QML Side, we instantiate a ColorContext object for each component we
want to theme, and we extract colors from it. there are 3 main sets of colors:
* `fg` for foreground colors, the sub colors are `primary` (the main color),
`secondary` (for component that requires a second color), `hightlight` (for
selection), `link` (for links), positive/neutral/
* `bg` expose the same set of color but for background
* decoration colors. theses are directly accessible in the `ColorContext`
object. `border`, `separator`, `accent`, `shadow` and `visualFocus`
ColorContext have a palette property that defines which palette should be use
(dark palette for the player or default palette), a `colorset` to define what
is the current color set (Button/View/Item/Slider/etc...) and some state
(enabled, focused, hovered, pressed)
When a color change due to either a state change or a palette change, the
color property change is signaled and the color will be changed through
property bindings
- - - - -
90071f50 by Pierre Lamot at 2023-02-28T15:38:29+00:00
qt: provide default light/dark palette for ColorContext
- - - - -
874a80a8 by Pierre Lamot at 2023-02-28T15:38:29+00:00
qt: provide Gtk theme for ColorContext
- - - - -
2408b38a by Pierre Lamot at 2023-02-28T15:38:29+00:00
qt: provide Qt system theme for ColorContext
- - - - -
58248c4e by Pierre Lamot at 2023-02-28T15:38:29+00:00
qml: use ColorContext to define colors in the application
- - - - -
140d9193 by Pierre Lamot at 2023-02-28T15:38:29+00:00
qml: remove unnecessary ControlCheckButton specialisation
- - - - -
eb0932be by Pierre Lamot at 2023-02-28T15:38:29+00:00
qml: remove default color form Label
- - - - -
50e660d8 by Pierre Lamot at 2023-02-28T15:38:29+00:00
qml: move setColorAlpha and blendColors to VLCStyle
VLCColors will be gone
We can't put them in Helpers.js as pure js files can't access QML singletons
- - - - -
cb95bc64 by Pierre Lamot at 2023-02-28T15:38:29+00:00
qt: remove old palette system
- - - - -
47105d95 by Pierre Lamot at 2023-02-28T15:38:29+00:00
qml: make the playlist button checked when the playlist is visible
- - - - -
30 changed files:
- modules/gui/qt/Makefile.am
- modules/gui/qt/dialogs/dialogs/qml/CustomDialog.qml
- modules/gui/qt/dialogs/dialogs/qml/Dialogs.qml
- modules/gui/qt/dialogs/dialogs/qml/ModalDialog.qml
- modules/gui/qt/dialogs/dialogs/qml/WindowDialog.qml
- modules/gui/qt/dialogs/toolbar/qml/EditorDNDDelegate.qml
- modules/gui/qt/dialogs/toolbar/qml/EditorDNDView.qml
- modules/gui/qt/dialogs/toolbar/qml/EditorDummyButton.qml
- modules/gui/qt/dialogs/toolbar/qml/ToolbarEditor.qml
- modules/gui/qt/dialogs/toolbar/qml/ToolbarEditorButtonList.qml
- modules/gui/qt/dialogs/toolbar/qml/ToolbarEditorDialog.qml
- modules/gui/qt/maininterface/mainui.cpp
- modules/gui/qt/maininterface/qml/BannerSources.qml
- modules/gui/qt/maininterface/qml/MainDisplay.qml
- modules/gui/qt/maininterface/qml/MainInterface.qml
- modules/gui/qt/maininterface/qml/MainTableView.qml
- modules/gui/qt/maininterface/qml/NoMedialibHome.qml
- modules/gui/qt/medialibrary/qml/ArtistTopBanner.qml
- modules/gui/qt/medialibrary/qml/EmptyLabel.qml
- modules/gui/qt/medialibrary/qml/MediaGroupDisplay.qml
- modules/gui/qt/medialibrary/qml/MusicAlbums.qml
- modules/gui/qt/medialibrary/qml/MusicAlbumsGridExpandDelegate.qml
- modules/gui/qt/medialibrary/qml/MusicAllArtists.qml
- modules/gui/qt/medialibrary/qml/MusicArtist.qml
- modules/gui/qt/medialibrary/qml/MusicArtistDelegate.qml
- modules/gui/qt/medialibrary/qml/MusicArtistsAlbums.qml
- modules/gui/qt/medialibrary/qml/MusicGenres.qml
- modules/gui/qt/medialibrary/qml/MusicTrackListDisplay.qml
- modules/gui/qt/medialibrary/qml/MusicTracksDisplay.qml
- modules/gui/qt/medialibrary/qml/PlaylistMedia.qml
The diff was not included because it is too large.
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/847fa924a0ac822db0c43226703733f6cea23f21...47105d950ece235da8273cdcd867b0021a2b1ac9
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/847fa924a0ac822db0c43226703733f6cea23f21...47105d950ece235da8273cdcd867b0021a2b1ac9
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list