[Sugar-devel] [PATCH sugar-artwork][DESIGN][PROPOSAL] Use the same style as Browse in all GtkNotebooks
BrowseNotebook is already used in Terminal and Browse, let's set it as the default GtkNotebook style. Signed-off-by: Daniel Francis --- gtk3/theme/gtk-widgets.css.em | 26 +- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/gtk3/theme/gtk-widgets.css.em b/gtk3/theme/gtk-widgets.css.em index 9059b49..c2351f0 100644 --- a/gtk3/theme/gtk-widgets.css.em +++ b/gtk3/theme/gtk-widgets.css.em @@ -297,36 +297,28 @@ GtkComboBox .separator { } .notebook tab { -background-color: @button_grey; -color: @white; -} - -.notebook tab:active { -background-color: @selection_grey; -} - -/* Browse notebook */ - -BrowseNotebook.notebook tab { background-color: @selection_grey; +color: @white; } -BrowseNotebook.notebook tab GtkLabel { +.notebook tab GtkLabel { color: @white; } -BrowseNotebook.notebook tab .button { -border-radius: $(toolbutton_padding)px; +.notebook tab:active { +background-color: @toolbar_grey; } -BrowseNotebook.notebook tab:active { -background-color: @toolbar_grey; +.notebook tab .button { +border-radius: $(toolbutton_padding)px; } -BrowseNotebook.notebook tab:active *:active { +.notebook tab:active *:active { color: @white; } +/* Browse Widgets */ + BrowseLinkInfo { color: @white; } -- 1.7.11.4 ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH sugar-artwork][DESIGN][PROPOSAL] Use the same style as Browse in all GtkNotebooks
Awesome Daniel, thank you very much for your patch, looks great. Comments below: 2012/9/16 Daniel Francis : > BrowseNotebook is already used in Terminal and Browse, let's set it as the > default GtkNotebook style. > > Signed-off-by: Daniel Francis > --- > gtk3/theme/gtk-widgets.css.em | 26 +- > 1 file changed, 9 insertions(+), 17 deletions(-) > > diff --git a/gtk3/theme/gtk-widgets.css.em b/gtk3/theme/gtk-widgets.css.em > index 9059b49..c2351f0 100644 > --- a/gtk3/theme/gtk-widgets.css.em > +++ b/gtk3/theme/gtk-widgets.css.em > @@ -297,36 +297,28 @@ GtkComboBox .separator { > } > > .notebook tab { > -background-color: @button_grey; > -color: @white; > -} > - > -.notebook tab:active { > -background-color: @selection_grey; > -} > - > -/* Browse notebook */ > - > -BrowseNotebook.notebook tab { > background-color: @selection_grey; > +color: @white; > } > > -BrowseNotebook.notebook tab GtkLabel { > +.notebook tab GtkLabel { > color: @white; > } For the label in the tab we will need to add some padding to get the tab height to the right size when the tabs have no buttons. We'll have to play with the calculations until we reach the same height as with buttons (like in Browse and Terminal gtk3). You can see that currently the tab enlarges vertically to fit the close button. I think we can do that in a separate patch, so I added this ticket to follow up: http://bugs.sugarlabs.org/ticket/3923 > > -BrowseNotebook.notebook tab .button { > -border-radius: $(toolbutton_padding)px; > +.notebook tab:active { > +background-color: @toolbar_grey; > } > > -BrowseNotebook.notebook tab:active { > -background-color: @toolbar_grey; > +.notebook tab .button { > +border-radius: $(toolbutton_padding)px; > } > > -BrowseNotebook.notebook tab:active *:active { > +.notebook tab:active *:active { > color: @white; > } I removed that rule and nothing broke :P I think we are safe removing it, as it was there to override the *:active {} global rule already removed. > +/* Browse Widgets */ > + > BrowseLinkInfo { > color: @white; > } We don't have that BrowseLinkInfo class in Browse anymore so I'll remove it too, adding it to the commit message. We will also need to style the background color for the buttons in mouse over (:prelight state) and when they are clicked/tapped (:active state maybe?) I attach a patch with the modifications above. Thanks again! > -- > 1.7.11.4 > > ___ > Sugar-devel mailing list > Sugar-devel@lists.sugarlabs.org > http://lists.sugarlabs.org/listinfo/sugar-devel -- .. manuq .. 0001-Use-the-same-style-as-Browse-in-all-GtkNotebooks-SL-.patch Description: Binary data ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH sugar-artwork][DESIGN][PROPOSAL] Use the same style as Browse in all GtkNotebooks
2012/9/17 Manuel Quiñones : > I attach a patch with the modifications above. Thanks again! Thanks to you, Manu! I'm starting to understand css. What I did is only rename BrowseNotebook to .notebook or if both types exist, mix their rules without know always what are that rules doing and without look at the Browse sources. I think the Gtk theme styling could replace lots of lines of Python code at activities (also sugar toolkit) for provide children the Sugar typical appearance. Specially for "sugarized" applications. Cheers. ~danielf P.S I added myself to the cc list at the bug ticket. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel
Re: [Sugar-devel] [PATCH sugar-artwork][DESIGN][PROPOSAL] Use the same style as Browse in all GtkNotebooks
2012/9/17 S. Daniel Francis : > 2012/9/17 Manuel Quiñones : >> I attach a patch with the modifications above. Thanks again! > Thanks to you, Manu! > > I'm starting to understand css. What I did is only rename > BrowseNotebook to .notebook or if both types exist, mix their rules > without know always what are that rules doing and without look at the > Browse sources. > > I think the Gtk theme styling could replace lots of lines of Python > code at activities (also sugar toolkit) for provide children the Sugar > typical appearance. Specially for "sugarized" applications. Yes Dani, that's the idea, make the styling in the theme once and for all, instead of setting backgrounds and alignments in the code. And your terrific patch helps to do it for the notebooks. Thanks! -- .. manuq .. ___ Sugar-devel mailing list Sugar-devel@lists.sugarlabs.org http://lists.sugarlabs.org/listinfo/sugar-devel