B00merang-Project / Windows-10

Windows 10 Light theme for Linux (GTK)
http://b00merang.weebly.com/windows-10.html
GNU General Public License v3.0
812 stars 113 forks source link

GtkToggleToolButtons are not styled #184

Closed theCapypara closed 3 years ago

theCapypara commented 4 years ago

Hi! Thanks for this theme!

The GtkToggleToolButton doesn't seem to have proper styling for when it's active:

In Adwaita: image

In this theme: image

There is no visual difference between the activated & deactivated item.

I used this simple Gtk Builder XML file to reproduce this:

<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.2 -->
<interface>
  <requires lib="gtk+" version="3.20"/>
  <object class="GtkToolbar">
    <property name="visible">True</property>
    <property name="can_focus">False</property>
    <child>
      <object class="GtkToggleToolButton">
        <property name="visible">True</property>
        <property name="can_focus">False</property>
        <property name="label" translatable="yes">Button</property>
        <property name="use_underline">True</property>
      </object>
      <packing>
        <property name="expand">False</property>
        <property name="homogeneous">True</property>
      </packing>
    </child>
  </object>
</interface>

Edit: This also affects the dark version of the theme.

Elbullazul commented 4 years ago

If I remember correctly, I set the toolbar buttons to share the styling with the flat buttons (no style by default). I didn't consider this particular case. I'll have a look and keep you updated when changes are made.

Btw, how do I build this app? I forgot how to build from xml

theCapypara commented 4 years ago

You can either use Glade (https://glade.gnome.org/) and it's preview function (it's the gears icon in the bottom left, when you select the toolbar).

Or you can use this Python script if you have Python and PyGObject:

from gi.repository import Gtk

window = Gtk.Window()
toolbar = Gtk.Toolbar()
toolbar_toggle_button = Gtk.ToggleToolButton.new()
toolbar_toggle_button.set_label("Button")
toolbar.add(toolbar_toggle_button)
window.add(toolbar)
window.show_all()
Gtk.main()
Elbullazul commented 3 years ago

it seems it now works as intended:

image