@@ -5,8 +5,8 @@ import type { Entity } from './ecs';
5
5
import type { Ext } from './extension' ;
6
6
import type { ShellWindow } from './window' ;
7
7
8
- import * as Ecs from 'ecs' ;
9
8
import * as a from 'arena' ;
9
+ import * as Ecs from 'ecs' ;
10
10
import * as utils from 'utils' ;
11
11
12
12
const Arena = a . Arena ;
@@ -34,25 +34,26 @@ interface StackWidgets {
34
34
function stack_widgets_new ( ) : StackWidgets {
35
35
let tabs = new St . BoxLayout ( {
36
36
style_class : 'pop-shell-stack' ,
37
- x_expand : true
37
+ pack_start : true ,
38
+ x_expand : false
38
39
} ) ;
39
40
40
- tabs . get_layout_manager ( ) ?. set_homogeneous ( true ) ;
41
+ // tabs.get_layout_manager()?.set_homogeneous(true);
41
42
42
43
return { tabs } ;
43
44
}
44
45
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
+ // })
56
57
57
58
interface TabButton extends St . Button {
58
59
set_title : ( title : string ) => void ;
@@ -62,49 +63,22 @@ const TabButton = GObject.registerClass({
62
63
Signals : { 'activate' : { } } ,
63
64
} , class TabButton extends St . Button {
64
65
_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 )
76
68
77
69
const container = new St . BoxLayout ( {
78
70
y_expand : true ,
79
- y_align : Clutter . ActorAlign . CENTER ,
71
+ y_align : Clutter . ActorAlign . START
80
72
} )
81
73
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
-
95
74
container . add_actor ( icon )
96
- container . add_actor ( label )
97
- container . add_actor ( close_button )
98
75
99
76
super . _init ( {
100
77
child : container ,
101
- x_expand : true ,
78
+ x_expand : false ,
102
79
y_expand : true ,
103
- y_align : Clutter . ActorAlign . CENTER ,
80
+ y_align : Clutter . ActorAlign . START ,
104
81
} )
105
-
106
-
107
- this . _title = label
108
82
}
109
83
110
84
set_title ( text : string ) {
0 commit comments