[Bar] Ellipsize too large text
This commit is contained in:
		| @@ -2,6 +2,7 @@ import AstalTray from "gi://AstalTray"; | ||||
| import { bind, GObject } from "astal"; | ||||
| import AstalHyprland from "gi://AstalHyprland"; | ||||
| import { Gtk } from "astal/gtk4"; | ||||
| import Pango from "gi://Pango?version=1.0"; | ||||
|  | ||||
| const hypr = AstalHyprland.get_default(); | ||||
| const SYNC = GObject.BindingFlags.SYNC_CREATE; | ||||
| @@ -105,7 +106,10 @@ const ActiveWindow = () => { | ||||
|                     focused.as( | ||||
|                         client => | ||||
|                             client && ( | ||||
|                                 <label label={bind(client, "title").as(String)} /> | ||||
|                                 <label | ||||
|                                     maxWidthChars={40} | ||||
|                                     ellipsize={Pango.EllipsizeMode.END} | ||||
|                                     label={bind(client, "title").as(String)} /> | ||||
|                             ), | ||||
|                     ) | ||||
|                 }></button> | ||||
| @@ -128,7 +132,7 @@ const WindowPopoverBox = () => { | ||||
|                             <label label={bind(client, 'title')}></label> | ||||
|                         </box> | ||||
|                     } | ||||
|                     onClicked={() => client.focus()} | ||||
|                         onClicked={() => client.focus()} | ||||
|                     ></button> | ||||
|                 }) | ||||
|             })} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user