elementaryart team mailing list archive
-
elementaryart team
-
Mailing list archive
-
Message #01703
[Merge] lp:~random-cpp/granite/new-modebutton-fixes into lp:granite
Giulio Collura has proposed merging lp:~random-cpp/granite/new-modebutton-fixes into lp:granite.
Requested reviews:
elementary desktop team (elementaryart)
For more details, see:
https://code.launchpad.net/~random-cpp/granite/new-modebutton-fixes/+merge/75877
I've improved a bit my modebutton. Now the css class is named "modebutton" and it should not have graphical bugs anymore.
--
https://code.launchpad.net/~random-cpp/granite/new-modebutton-fixes/+merge/75877
Your team elementary desktop team is requested to review the proposed merge of lp:~random-cpp/granite/new-modebutton-fixes into lp:granite.
=== added file 'data/style/ModeButton.css'
--- data/style/ModeButton.css 1970-01-01 00:00:00 +0000
+++ data/style/ModeButton.css 2011-09-17 22:53:28 +0000
@@ -0,0 +1,45 @@
+/*
+* Copyright (C) 2011 Giulio Collura
+*
+* This program is free software: you can redistribute it and/or modify
+* it under the terms of the GNU General Public License as published by
+* the Free Software Foundation, either version 3 of the License, or
+* (at your option) any later version.
+*
+* This program is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU General Public License for more details.
+*
+* You should have received a copy of the GNU General Public License
+* along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+.modebutton {
+ -GtkToolbar-button-relief: normal;
+ border-radius: 0 0 0 0;
+ border-style: solid;
+ border-width: 1 0 1 1;
+
+ -unico-outer-stroke-width: 1 0 1 0;
+ -unico-outer-stroke-radius: 0 0 0 0;
+}
+
+.modebutton:active,
+.modebutton:insensitive {
+ -unico-outer-stroke-width: 1 0 1 0;
+}
+
+.modebutton:nth-child(first) {
+ border-radius: 3 0 0 3;
+ border-width: 1 0 1 1;
+
+ -unico-outer-stroke-width: 1 0 1 1;
+}
+
+.modebutton:nth-child(last) {
+ border-radius: 0 3 3 0;
+ border-width: 1;
+
+ -unico-outer-stroke-width: 1 1 1 0;
+}
=== removed file 'data/style/Switcher.css'
--- data/style/Switcher.css 2011-09-17 18:08:27 +0000
+++ data/style/Switcher.css 1970-01-01 00:00:00 +0000
@@ -1,31 +0,0 @@
-.switcher:nth-child(last) {
- border-radius: 0 0 3 3;
- border-width: 0 1 1 1;
-}
-
-.switcher {
- -GtkToolbar-button-relief:
- border-radius: 0 0 0 0;
- border-style: solid;
- border-width: 1 0 1 1;
-
- -unico-outer-stroke-width: 1 0 1 0;
-}
-
-.switcher:active,
-.switcher:insensitive {
- -unico-outer-stroke-width: 1 0 1 0;
-}
-
-.switcher:nth-child(first) {
- border-radius: 3 0 0 3;
-
- -unico-outer-stroke-width: 1 0 1 1;
-}
-
-.switcher:nth-child(last) {
- border-radius: 0 3 3 0;
- border-width: 1;
-
- -unico-outer-stroke-width: 1 1 1 0;
-}
=== modified file 'lib/Widgets/ModeButton.vala'
--- lib/Widgets/ModeButton.vala 2011-09-17 18:08:27 +0000
+++ lib/Widgets/ModeButton.vala 2011-09-17 22:53:28 +0000
@@ -45,7 +45,7 @@
{
style_provider = new CssProvider ();
try {
- style_provider.load_from_path (Build.RESOURCES_DIR + "/style/Switcher.css");
+ style_provider.load_from_path (Build.RESOURCES_DIR + "/style/ModeButton.css");
} catch (Error e) {
warning ("Could not add css provider. Some widgets will not look as intended. %s", e.message);
}
@@ -67,7 +67,7 @@
button.add(w);
//button.width_request = 30;
button.can_focus = false;
- button.get_style_context ().add_class ("switcher");
+ button.get_style_context ().add_class ("modebutton");
button.get_style_context ().add_provider (style_provider, 600);
button.button_press_event.connect (() => {
Follow ups