elementary / switchboard-plug-power

Switchboard Power Plug
GNU General Public License v2.0
19 stars 13 forks source link

MainView: use Gtk.Dropdown for power button behavior #248

Closed danirabbit closed 7 months ago

danirabbit commented 7 months ago

This doesn't need to be a whole widget for a simple dropdown. Fixes deprecation warning and set mnemonic widget for the screen reader

leolost2605 commented 7 months ago

I just came across the same dropdown resizing issue in another part in settings. A possible solution would be something like this:

var size_group = new Gtk.SizeGroup (HORIZONTAL);
size_group.add_widget (drop_down.get_first_child ()); //The toggle button
size_group.add_widget (drop_down.get_last_child ().get_first_child ()); //The popover

Would this be accepted?

danirabbit commented 7 months ago

Yeah I didn't make a huge effort here because the alignment of this whole view is pretty fucky so I'll need to come back later after everything is updated to fix things. But yeah I think a sizegroup is needed here

danirabbit commented 7 months ago

@jeremypw reverted layout changes! I'll deal with those as a group in another branch