js: Use generic actor properties to align StBin children

StBin's fill/align properties are now no-ops; get back the intended
child allocation by setting the corresponding x/y-align on the child.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/803
This commit is contained in:
Florian Müllner
2019-10-17 23:40:24 +02:00
parent 72af64d964
commit f2bd39b20c
25 changed files with 155 additions and 140 deletions

View File

@ -37,7 +37,6 @@ class TodayButton extends St.Button {
// until the selected date changes.
super._init({
style_class: 'datemenu-today-button',
x_align: St.Align.START,
x_expand: true,
can_focus: true,
reactive: false
@ -90,7 +89,6 @@ class WorldClocksSection extends St.Button {
_init() {
super._init({
style_class: 'world-clocks-button',
x_fill: true,
can_focus: true,
x_expand: true,
});
@ -101,6 +99,7 @@ class WorldClocksSection extends St.Button {
let layout = new Clutter.GridLayout({ orientation: Clutter.Orientation.VERTICAL });
this._grid = new St.Widget({ style_class: 'world-clocks-grid',
x_expand: true,
layout_manager: layout });
layout.hookup_style(this._grid);
@ -253,15 +252,17 @@ class WeatherSection extends St.Button {
_init() {
super._init({
style_class: 'weather-button',
x_fill: true,
can_focus: true,
x_expand: true,
});
this._weatherClient = new Weather.WeatherClient();
let box = new St.BoxLayout({ style_class: 'weather-box',
vertical: true });
let box = new St.BoxLayout({
style_class: 'weather-box',
vertical: true,
x_expand: true,
});
this.child = box;
@ -582,12 +583,13 @@ class DateMenuButton extends PanelMenu.Button {
vbox.add_actor(this._calendar);
this._displaysSection = new St.ScrollView({ style_class: 'datemenu-displays-section vfade',
x_expand: true, x_fill: true,
x_expand: true,
overlay_scrollbars: true });
this._displaysSection.set_policy(St.PolicyType.NEVER, St.PolicyType.AUTOMATIC);
vbox.add_actor(this._displaysSection);
let displaysBox = new St.BoxLayout({ vertical: true,
x_expand: true,
style_class: 'datemenu-displays-box' });
this._displaysSection.add_actor(displaysBox);