D18999: Remove ignore style properties from CSS
Andrzej BroĊski
noreply at phabricator.kde.org
Thu Feb 14 09:32:05 GMT 2019
andrzej1_1 created this revision.
andrzej1_1 added a project: Breeze.
Herald added a project: Plasma.
Herald added a subscriber: plasma-devel.
andrzej1_1 requested review of this revision.
REVISION SUMMARY
When I was running //GTK3// application //pavucontrol//, I was getting warnings:
(pavucontrol:10863): Gtk-WARNING **: 10:09:55.669: Theme parsing error: gtk.css:127:35: The style property GtkButton:child-displacement-x is deprecated and shouldn't be used anymore. It will be removed in a future version
(pavucontrol:10863): Gtk-WARNING **: 10:09:55.669: Theme parsing error: gtk.css:128:35: The style property GtkButton:child-displacement-y is deprecated and shouldn't be used anymore. It will be removed in a future version
(pavucontrol:10863): Gtk-WARNING **: 10:09:55.669: Theme parsing error: gtk.css:129:34: The style property GtkCheckButton:indicator-size is deprecated and shouldn't be used anymore. It will be removed in a future version
(pavucontrol:10863): Gtk-WARNING **: 10:09:55.669: Theme parsing error: gtk.css:130:36: The style property GtkCheckMenuItem:indicator-size is deprecated and shouldn't be used anymore. It will be removed in a future version
(pavucontrol:10863): Gtk-WARNING **: 10:09:55.669: Theme parsing error: gtk.css:132:46: The style property GtkScrolledWindow:scrollbars-within-bevel is deprecated and shouldn't be used anymore. It will be removed in a future version
(pavucontrol:10863): Gtk-WARNING **: 10:09:55.669: Theme parsing error: gtk.css:135:30: The style property GtkExpander:expander-size is
deprecated and shouldn't be used anymore. It will be removed in a future version
(pavucontrol:10863): Gtk-WARNING **: 10:09:55.669: Theme parsing error: gtk.css:142:29: The style property GtkStatusbar:shadow-type is deprecated and shouldn't be used anymore. It will be removed in a future version
This was annoying, so I decided to fix it. Firstly I thought it is a application problem, but then I discovered it is //breeze-gtk// issue. For example //GTK3// documentation states that:
> GtkStatusbar:shadow-type has been deprecated since version 3.20 and should not be used in newly-written code.
>
> Use CSS properties to determine the appearance, the value of this style property is ignored.
So if some styles are ignored, I can remove them and get rid of part of warnings:
1. I wrote python script for finding all deprecation messages in docs: F6614333: find-deprecated-styles.py <https://phabricator.kde.org/F6614333>
2. I ran script and saved results to file
3. I used it to find all ignored properties in CSS:
$ find-deprecated-styles.py > /tmp/gtk-deprecated.txt
$ cd breeze-gtk/src/gtk320/
$ cat /tmp/gtk-deprecated.txt | sed -n 's/^ \* \([^ ]*\).*the value of this style property is ignored.*$/\1/p' | tr : - | while read style; do grep -Rn $style; done
widgets/_base.scss:40: -GtkStatusbar-shadow-type: none;
widgets/_base.scss:12: -GtkButton-child-displacement-x: 0;
widgets/_base.scss:13: -GtkButton-child-displacement-y: 0;
widgets/_base.scss:16: -GtkCheckMenuItem-indicator-size: 18;
widgets/_base.scss:24: -GtkScrolledWindow-scrollbars-within-bevel: 0;
Then I just removed them.
REPOSITORY
R98 Breeze for Gtk
REVISION DETAIL
https://phabricator.kde.org/D18999
AFFECTED FILES
src/gtk320/widgets/_base.scss
To: andrzej1_1
Cc: plasma-devel, jraleigh, GB_2, trickyricky26, ragreen, Pitel, ZrenBot, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20190214/50fb7e71/attachment.html>
More information about the Plasma-devel
mailing list