@@ -5,8 +5,8 @@ import type { Entity } from './ecs';
55import type { Ext } from './extension' ;
66import type { ShellWindow } from './window' ;
77
8- import * as Ecs from 'ecs' ;
98import * as a from 'arena' ;
9+ import * as Ecs from 'ecs' ;
1010import * as utils from 'utils' ;
1111
1212const Arena = a . Arena ;
@@ -34,25 +34,26 @@ interface StackWidgets {
3434function stack_widgets_new ( ) : StackWidgets {
3535 let tabs = new St . BoxLayout ( {
3636 style_class : 'pop-shell-stack' ,
37- x_expand : true
37+ pack_start : true ,
38+ x_expand : false
3839 } ) ;
3940
40- tabs . get_layout_manager ( ) ?. set_homogeneous ( true ) ;
41+ // tabs.get_layout_manager()?.set_homogeneous(true);
4142
4243 return { tabs } ;
4344}
4445
45- const ContainerButton = GObject . registerClass ( {
46- Signals : { 'activate' : { } } ,
47- } , class ImageButton extends St . Button {
48- _init ( icon : St . Icon ) {
49- super . _init ( {
50- child : icon ,
51- x_expand : true ,
52- y_expand : true ,
53- } )
54- }
55- } )
46+ // const ContainerButton = GObject.registerClass({
47+ // Signals: { 'activate': {} },
48+ // }, class ImageButton extends St.Button {
49+ // _init(icon: St.Icon) {
50+ // super._init({
51+ // child: icon,
52+ // x_expand: true,
53+ // y_expand: true,
54+ // })
55+ // }
56+ // })
5657
5758interface TabButton extends St . Button {
5859 set_title : ( title : string ) => void ;
@@ -62,49 +63,22 @@ const TabButton = GObject.registerClass({
6263 Signals : { 'activate' : { } } ,
6364} , class TabButton extends St . Button {
6465 _init ( window : ShellWindow ) {
65- const icon = window . icon ( window . ext , 24 )
66- icon . set_x_align ( Clutter . ActorAlign . START )
67-
68- const label = new St . Label ( {
69- y_expand : true ,
70- x_align : Clutter . ActorAlign . START ,
71- y_align : Clutter . ActorAlign . CENTER ,
72- style : "padding-left: 8px"
73- } )
74-
75- label . text = window . title ( )
66+ const icon = window . icon ( window . ext , TAB_HEIGHT )
67+ icon . set_x_align ( Clutter . ActorAlign . CENTER )
7668
7769 const container = new St . BoxLayout ( {
7870 y_expand : true ,
79- y_align : Clutter . ActorAlign . CENTER ,
71+ y_align : Clutter . ActorAlign . START
8072 } )
8173
82- const close_button = new ContainerButton ( new St . Icon ( {
83- icon_name : 'window-close-symbolic' ,
84- icon_size : 24 ,
85- y_align : Clutter . ActorAlign . CENTER ,
86- } ) )
87-
88- close_button . connect ( 'clicked' , ( ) => {
89- window . meta . delete ( global . get_current_time ( ) )
90- } )
91-
92- close_button . set_x_align ( Clutter . ActorAlign . END )
93- close_button . set_y_align ( Clutter . ActorAlign . CENTER )
94-
9574 container . add_actor ( icon )
96- container . add_actor ( label )
97- container . add_actor ( close_button )
9875
9976 super . _init ( {
10077 child : container ,
101- x_expand : true ,
78+ x_expand : false ,
10279 y_expand : true ,
103- y_align : Clutter . ActorAlign . CENTER ,
80+ y_align : Clutter . ActorAlign . START ,
10481 } )
105-
106-
107- this . _title = label
10882 }
10983
11084 set_title ( text : string ) {
0 commit comments