Skip to content

Commit

Permalink
SwitchModelButton: wrap label
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit committed Jul 29, 2024
1 parent a452547 commit 4e7e701
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion demo/Views/ModeButtonView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class ModeButtonView : Gtk.Box {

var switchmodelbutton = new Granite.SwitchModelButton ("Default");

var description_switchmodelbutton = new Granite.SwitchModelButton ("With Description") {
var description_switchmodelbutton = new Granite.SwitchModelButton ("A SwitchModelButton With A Description") {
active = true,
description = "A description of additional affects related to the activation state of this switch"
};
Expand Down
7 changes: 4 additions & 3 deletions lib/Widgets/SwitchModelButton.vala
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ public class Granite.SwitchModelButton : Gtk.ToggleButton {

construct {
var label = new Gtk.Label (text) {
ellipsize = Pango.EllipsizeMode.MIDDLE,
halign = Gtk.Align.START,
halign = START,
hexpand = true,
vexpand = true,
max_width_chars = 25,
vexpand = true,
wrap = true,
xalign = 0,
mnemonic_widget = this
};

Expand Down

0 comments on commit 4e7e701

Please sign in to comment.