💥 fix(control-center/tile): label expanding control center size
This commit is contained in:
@@ -74,6 +74,7 @@ class Tile extends Gtk.Box {
|
|||||||
|
|
||||||
this.icon = props.icon;
|
this.icon = props.icon;
|
||||||
this.title = props.title;
|
this.title = props.title;
|
||||||
|
this.hexpand = true;
|
||||||
|
|
||||||
if(props.hasArrow != null)
|
if(props.hasArrow != null)
|
||||||
this.hasArrow = props.hasArrow;
|
this.hasArrow = props.hasArrow;
|
||||||
@@ -104,11 +105,12 @@ class Tile extends Gtk.Box {
|
|||||||
valign={Gtk.Align.CENTER} hexpand>
|
valign={Gtk.Align.CENTER} hexpand>
|
||||||
|
|
||||||
<Gtk.Label class={"title"} label={createBinding(this, "title")}
|
<Gtk.Label class={"title"} label={createBinding(this, "title")}
|
||||||
xalign={0} ellipsize={Pango.EllipsizeMode.END} />
|
xalign={0} ellipsize={Pango.EllipsizeMode.END} hexpand={false}
|
||||||
|
maxWidthChars={10} />
|
||||||
<Gtk.Label class={"description"} label={createBinding(this, "description")}
|
<Gtk.Label class={"description"} label={createBinding(this, "description")}
|
||||||
xalign={0} ellipsize={Pango.EllipsizeMode.END} visible={
|
xalign={0} ellipsize={Pango.EllipsizeMode.END} visible={
|
||||||
variableToBoolean(createBinding(this, "description"))
|
variableToBoolean(createBinding(this, "description"))
|
||||||
}
|
} maxWidthChars={15} hexpand={false}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Gtk.GestureClick onReleased={() => {
|
<Gtk.GestureClick onReleased={() => {
|
||||||
@@ -123,7 +125,7 @@ class Tile extends Gtk.Box {
|
|||||||
|
|
||||||
if(this.hasArrow)
|
if(this.hasArrow)
|
||||||
this.append(
|
this.append(
|
||||||
<Gtk.Image class={"arrow"} iconName={"go-next-symbolic"}>
|
<Gtk.Image class={"arrow"} iconName={"go-next-symbolic"} halign={Gtk.Align.END}>
|
||||||
<Gtk.GestureClick onReleased={() => {
|
<Gtk.GestureClick onReleased={() => {
|
||||||
this.emit("clicked");
|
this.emit("clicked");
|
||||||
if(this.enableOnClicked && !this.state)
|
if(this.enableOnClicked && !this.state)
|
||||||
|
|||||||
Reference in New Issue
Block a user