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:
parent
72af64d964
commit
f2bd39b20c
@ -88,8 +88,6 @@ var AuthPrompt = GObject.registerClass({
|
||||
this.connect('destroy', this._onDestroy.bind(this));
|
||||
|
||||
this._userWell = new St.Bin({
|
||||
x_fill: true,
|
||||
x_align: St.Align.START,
|
||||
x_expand: true,
|
||||
y_expand: true,
|
||||
});
|
||||
@ -447,6 +445,7 @@ var AuthPrompt = GObject.registerClass({
|
||||
|
||||
if (user) {
|
||||
let userWidget = new UserWidget.UserWidget(user);
|
||||
userWidget.x_align = Clutter.ActorAlign.START;
|
||||
this._userWell.set_child(userWidget);
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,10 @@ var UserListItem = GObject.registerClass({
|
||||
Signals: { 'activate': {} }
|
||||
}, class UserListItem extends St.Button {
|
||||
_init(user) {
|
||||
let layout = new St.BoxLayout({ vertical: true });
|
||||
let layout = new St.BoxLayout({
|
||||
vertical: true,
|
||||
x_align: Clutter.ActorAlign.START,
|
||||
});
|
||||
super._init({
|
||||
style_class: 'login-dialog-user-list-item',
|
||||
button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
|
||||
@ -50,8 +53,6 @@ var UserListItem = GObject.registerClass({
|
||||
x_expand: true,
|
||||
child: layout,
|
||||
reactive: true,
|
||||
x_align: St.Align.START,
|
||||
x_fill: true
|
||||
});
|
||||
|
||||
this.user = user;
|
||||
@ -456,15 +457,18 @@ var LoginDialog = GObject.registerClass({
|
||||
// translators: this message is shown below the user list on the
|
||||
// login screen. It can be activated to reveal an entry for
|
||||
// manually entering the username.
|
||||
let notListedLabel = new St.Label({ text: _("Not listed?"),
|
||||
style_class: 'login-dialog-not-listed-label' });
|
||||
this._notListedButton = new St.Button({ style_class: 'login-dialog-not-listed-button',
|
||||
let notListedLabel = new St.Label({
|
||||
text: _("Not listed?"),
|
||||
style_class: 'login-dialog-not-listed-label',
|
||||
x_align: Clutter.ActorAlign.START,
|
||||
});
|
||||
this._notListedButton = new St.Button({
|
||||
style_class: 'login-dialog-not-listed-button',
|
||||
button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE,
|
||||
can_focus: true,
|
||||
child: notListedLabel,
|
||||
reactive: true,
|
||||
x_align: St.Align.START,
|
||||
x_fill: true });
|
||||
});
|
||||
|
||||
this._notListedButton.connect('clicked', this._hideUserListAskForUsernameAndBeginVerification.bind(this));
|
||||
|
||||
|
@ -655,7 +655,7 @@ class AppIcon extends St.BoxLayout {
|
||||
|
||||
this.app = app;
|
||||
this.icon = null;
|
||||
this._iconBin = new St.Bin({ x_fill: true, y_fill: true });
|
||||
this._iconBin = new St.Bin();
|
||||
|
||||
this.add_child(this._iconBin);
|
||||
this.label = new St.Label({
|
||||
@ -894,12 +894,13 @@ class ThumbnailList extends SwitcherPopup.SwitcherList {
|
||||
|
||||
let title = windows[i].get_title();
|
||||
if (title) {
|
||||
let name = new St.Label({ text: title });
|
||||
// St.Label doesn't support text-align so use a Bin
|
||||
let bin = new St.Bin({ x_align: St.Align.MIDDLE });
|
||||
let name = new St.Label({
|
||||
text: title,
|
||||
// St.Label doesn't support text-align
|
||||
x_align: Clutter.ActorAlign.CENTER,
|
||||
});
|
||||
this._labels.push(bin);
|
||||
bin.add_actor(name);
|
||||
box.add_actor(bin);
|
||||
box.add_actor(name);
|
||||
|
||||
this.addItem(box, name);
|
||||
} else {
|
||||
|
@ -305,10 +305,7 @@ var AllView = GObject.registerClass({
|
||||
this._scrollView = new St.ScrollView({ style_class: 'all-apps',
|
||||
x_expand: true,
|
||||
y_expand: true,
|
||||
x_fill: true,
|
||||
y_fill: false,
|
||||
reactive: true,
|
||||
y_align: St.Align.START });
|
||||
reactive: true, });
|
||||
this.add_actor(this._scrollView);
|
||||
this._grid._delegate = this;
|
||||
|
||||
@ -327,7 +324,10 @@ var AllView = GObject.registerClass({
|
||||
this.folderIcons = [];
|
||||
|
||||
this._stack = new St.Widget({ layout_manager: new Clutter.BinLayout() });
|
||||
let box = new St.BoxLayout({ vertical: true });
|
||||
let box = new St.BoxLayout({
|
||||
vertical: true,
|
||||
y_align: Clutter.ActorAlign.START,
|
||||
});
|
||||
|
||||
this._grid.currentPage = 0;
|
||||
this._stack.add_actor(this._grid);
|
||||
@ -1046,8 +1046,11 @@ class AppDisplay extends St.BoxLayout {
|
||||
this._viewStackLayout.connect('allocated-size-changed', this._onAllocatedSizeChanged.bind(this));
|
||||
this.add_actor(this._viewStack);
|
||||
let layout = new ControlsBoxLayout({ homogeneous: true });
|
||||
this._controls = new St.Widget({ style_class: 'app-view-controls',
|
||||
layout_manager: layout });
|
||||
this._controls = new St.Widget({
|
||||
style_class: 'app-view-controls',
|
||||
layout_manager: layout,
|
||||
x_align: Clutter.ActorAlign.CENTER,
|
||||
});
|
||||
this._controls.connect('notify::mapped', () => {
|
||||
// controls are faded either with their parent or
|
||||
// explicitly in animate(); we can't know how they'll be
|
||||
@ -1266,15 +1269,18 @@ class FolderView extends BaseAppView {
|
||||
|
||||
this._scrollView = new St.ScrollView({
|
||||
overlay_scrollbars: true,
|
||||
x_fill: true,
|
||||
y_fill: true,
|
||||
x_expand: true,
|
||||
y_expand: true
|
||||
});
|
||||
this._scrollView.set_policy(St.PolicyType.NEVER, St.PolicyType.AUTOMATIC);
|
||||
this.add_actor(this._scrollView);
|
||||
|
||||
let scrollableContainer = new St.BoxLayout({ vertical: true, reactive: true });
|
||||
let scrollableContainer = new St.BoxLayout({
|
||||
vertical: true,
|
||||
reactive: true,
|
||||
x_expand: true,
|
||||
y_expand: true,
|
||||
});
|
||||
scrollableContainer.add_actor(this._grid);
|
||||
this._scrollView.add_actor(scrollableContainer);
|
||||
|
||||
@ -1462,8 +1468,6 @@ var FolderIcon = GObject.registerClass({
|
||||
button_mask: St.ButtonMask.ONE,
|
||||
toggle_mode: true,
|
||||
can_focus: true,
|
||||
x_fill: true,
|
||||
y_fill: true
|
||||
});
|
||||
this.id = id;
|
||||
this.name = '';
|
||||
@ -1902,10 +1906,7 @@ var AppFolderPopup = GObject.registerClass({
|
||||
|
||||
this._boxPointer = new BoxPointer.BoxPointer(this._arrowSide,
|
||||
{ style_class: 'app-folder-popup-bin',
|
||||
x_fill: true,
|
||||
y_fill: true,
|
||||
x_expand: true,
|
||||
x_align: St.Align.START });
|
||||
x_expand: true, });
|
||||
|
||||
this._boxPointer.style_class = 'app-folder-popup';
|
||||
this.add_actor(this._boxPointer);
|
||||
@ -2057,8 +2058,6 @@ var AppIcon = GObject.registerClass({
|
||||
reactive: true,
|
||||
button_mask: St.ButtonMask.ONE | St.ButtonMask.TWO,
|
||||
can_focus: true,
|
||||
x_fill: true,
|
||||
y_fill: true
|
||||
});
|
||||
|
||||
this.app = app;
|
||||
|
@ -790,8 +790,8 @@ class EventsSection extends MessageList.MessageListSection {
|
||||
|
||||
this._title = new St.Button({ style_class: 'events-section-title',
|
||||
label: '',
|
||||
x_align: St.Align.START,
|
||||
can_focus: true });
|
||||
this._title.child.x_align = Clutter.ActorAlign.START;
|
||||
this.insert_child_below(this._title, null);
|
||||
|
||||
this._title.connect('clicked', this._onTitleClicked.bind(this));
|
||||
@ -1078,8 +1078,7 @@ class CalendarMessageList extends St.Widget {
|
||||
|
||||
this._scrollView = new St.ScrollView({ style_class: 'vfade',
|
||||
overlay_scrollbars: true,
|
||||
x_expand: true, y_expand: true,
|
||||
x_fill: true, y_fill: true });
|
||||
x_expand: true, y_expand: true, });
|
||||
this._scrollView.set_policy(St.PolicyType.NEVER, St.PolicyType.AUTOMATIC);
|
||||
box.add_actor(this._scrollView);
|
||||
|
||||
@ -1098,6 +1097,7 @@ class CalendarMessageList extends St.Widget {
|
||||
|
||||
this._sectionList = new St.BoxLayout({ style_class: 'message-list-sections',
|
||||
vertical: true,
|
||||
x_expand: true,
|
||||
y_expand: true,
|
||||
y_align: Clutter.ActorAlign.START });
|
||||
this._sectionList.connect('actor-added', this._sync.bind(this));
|
||||
|
@ -11,11 +11,12 @@ class CheckBox extends St.Button {
|
||||
button_mask: St.ButtonMask.ONE,
|
||||
toggle_mode: true,
|
||||
can_focus: true,
|
||||
x_fill: true,
|
||||
y_fill: true
|
||||
});
|
||||
|
||||
this._box = new St.Bin();
|
||||
this._box = new St.Bin({
|
||||
x_expand: true,
|
||||
y_expand: true,
|
||||
});
|
||||
this._box.set_y_align(Clutter.ActorAlign.START);
|
||||
container.add_actor(this._box);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
// -*- mode: js; js-indent-level: 4; indent-tabs-mode: nil -*-
|
||||
/* exported Component */
|
||||
|
||||
const { Gio, GObject, St } = imports.gi;
|
||||
const { Clutter, Gio, GObject, St } = imports.gi;
|
||||
|
||||
const GnomeSession = imports.misc.gnomeSession;
|
||||
const Main = imports.ui.main;
|
||||
@ -320,20 +320,23 @@ class AutorunNotification extends MessageTray.Notification {
|
||||
}
|
||||
|
||||
_buttonForApp(app) {
|
||||
let box = new St.BoxLayout();
|
||||
let box = new St.BoxLayout({
|
||||
x_expand: true,
|
||||
x_align: Clutter.ActorAlign.START,
|
||||
});
|
||||
let icon = new St.Icon({ gicon: app.get_icon(),
|
||||
style_class: 'hotplug-notification-item-icon' });
|
||||
box.add(icon);
|
||||
|
||||
let label = new St.Bin({
|
||||
y_align: St.Align.MIDDLE,
|
||||
child: new St.Label({ text: _("Open with %s").format(app.get_name()) }),
|
||||
child: new St.Label({
|
||||
text: _("Open with %s").format(app.get_name()),
|
||||
y_align: Clutter.ActorAlign.CENTER,
|
||||
}),
|
||||
});
|
||||
box.add(label);
|
||||
|
||||
let button = new St.Button({ child: box,
|
||||
x_fill: true,
|
||||
x_align: St.Align.START,
|
||||
x_expand: true,
|
||||
button_mask: St.ButtonMask.ONE,
|
||||
style_class: 'hotplug-notification-item button' });
|
||||
|
@ -285,9 +285,12 @@ var DashActor = GObject.registerClass(
|
||||
class DashActor extends St.Widget {
|
||||
_init() {
|
||||
let layout = new Clutter.BoxLayout({ orientation: Clutter.Orientation.VERTICAL });
|
||||
super._init({ name: 'dash',
|
||||
super._init({
|
||||
name: 'dash',
|
||||
layout_manager: layout,
|
||||
clip_to_allocation: true });
|
||||
clip_to_allocation: true,
|
||||
y_align: Clutter.ActorAlign.CENTER,
|
||||
});
|
||||
}
|
||||
|
||||
vfunc_allocate(box, flags) {
|
||||
|
@ -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);
|
||||
|
||||
|
@ -39,18 +39,19 @@ class BaseIcon extends St.Bin {
|
||||
if (params.showLabel)
|
||||
styleClass += ' overview-icon-with-label';
|
||||
|
||||
super._init({ style_class: styleClass,
|
||||
x_fill: true,
|
||||
y_fill: true });
|
||||
super._init({ style_class: styleClass });
|
||||
|
||||
this.connect('destroy', this._onDestroy.bind(this));
|
||||
|
||||
this._box = new St.BoxLayout({ vertical: true });
|
||||
this._box = new St.BoxLayout({
|
||||
vertical: true,
|
||||
x_expand: true,
|
||||
y_expand: true,
|
||||
});
|
||||
this.set_child(this._box);
|
||||
|
||||
this.iconSize = ICON_SIZE;
|
||||
this._iconBin = new St.Bin({ x_align: St.Align.MIDDLE,
|
||||
y_align: St.Align.MIDDLE });
|
||||
this._iconBin = new St.Bin();
|
||||
|
||||
this._box.add_actor(this._iconBin);
|
||||
|
||||
|
@ -292,10 +292,7 @@ var Key = GObject.registerClass({
|
||||
if (this._extended_keys.length == 0)
|
||||
return;
|
||||
|
||||
this._boxPointer = new BoxPointer.BoxPointer(St.Side.BOTTOM,
|
||||
{ x_fill: true,
|
||||
y_fill: true,
|
||||
x_align: St.Align.START });
|
||||
this._boxPointer = new BoxPointer.BoxPointer(St.Side.BOTTOM);
|
||||
this._boxPointer.hide();
|
||||
Main.layoutManager.addTopChrome(this._boxPointer);
|
||||
this._boxPointer.setPosition(this.keyButton, 0.5);
|
||||
|
@ -264,7 +264,7 @@ class ObjLink extends St.Button {
|
||||
reactive: true,
|
||||
track_hover: true,
|
||||
style_class: 'shell-link',
|
||||
label: text
|
||||
label: text,
|
||||
});
|
||||
this.set_x_align(Clutter.ActorAlign.START);
|
||||
this.get_child().single_line_mode = true;
|
||||
@ -359,8 +359,6 @@ class ObjInspector extends St.ScrollView {
|
||||
_init(lookingGlass) {
|
||||
super._init({
|
||||
pivot_point: new Graphene.Point({ x: 0.5, y: 0.5 }),
|
||||
x_fill: true,
|
||||
y_fill: true
|
||||
});
|
||||
|
||||
this._obj = null;
|
||||
@ -369,9 +367,13 @@ class ObjInspector extends St.ScrollView {
|
||||
this._parentList = [];
|
||||
|
||||
this.get_hscroll_bar().hide();
|
||||
this._container = new St.BoxLayout({ name: 'LookingGlassPropertyInspector',
|
||||
this._container = new St.BoxLayout({
|
||||
name: 'LookingGlassPropertyInspector',
|
||||
style_class: 'lg-dialog',
|
||||
vertical: true });
|
||||
vertical: true,
|
||||
x_expand: true,
|
||||
y_expand: true,
|
||||
});
|
||||
this.add_actor(this._container);
|
||||
|
||||
this._lookingGlass = lookingGlass;
|
||||
|
@ -1278,7 +1278,7 @@ var ZoomRegion = class ZoomRegion {
|
||||
|
||||
_createActors() {
|
||||
// The root actor for the zoom region
|
||||
this._magView = new St.Bin({ style_class: 'magnifier-zoom-region', x_fill: true, y_fill: true });
|
||||
this._magView = new St.Bin({ style_class: 'magnifier-zoom-region' });
|
||||
global.stage.add_actor(this._magView);
|
||||
|
||||
// hide the magnified region from CLUTTER_PICK_ALL
|
||||
|
@ -307,13 +307,16 @@ var Message = GObject.registerClass({
|
||||
accessible_role: Atk.Role.NOTIFICATION,
|
||||
can_focus: true,
|
||||
x_expand: true,
|
||||
x_fill: true
|
||||
y_expand: true,
|
||||
});
|
||||
|
||||
this.expanded = false;
|
||||
this._useBodyMarkup = false;
|
||||
|
||||
let vbox = new St.BoxLayout({ vertical: true });
|
||||
let vbox = new St.BoxLayout({
|
||||
vertical: true,
|
||||
x_expand: true,
|
||||
});
|
||||
this.set_child(vbox);
|
||||
|
||||
let hbox = new St.BoxLayout();
|
||||
@ -325,7 +328,7 @@ var Message = GObject.registerClass({
|
||||
|
||||
this._iconBin = new St.Bin({ style_class: 'message-icon-bin',
|
||||
y_expand: true,
|
||||
y_align: St.Align.START,
|
||||
y_align: Clutter.ActorAlign.START,
|
||||
visible: false });
|
||||
hbox.add_actor(this._iconBin);
|
||||
|
||||
@ -344,8 +347,7 @@ var Message = GObject.registerClass({
|
||||
titleBox.add_actor(this.titleLabel);
|
||||
|
||||
this._secondaryBin = new St.Bin({ style_class: 'message-secondary-bin',
|
||||
x_expand: true, y_expand: true,
|
||||
x_fill: true, y_fill: true });
|
||||
x_expand: true, y_expand: true, });
|
||||
titleBox.add_actor(this._secondaryBin);
|
||||
|
||||
let closeIcon = new St.Icon({ icon_name: 'window-close-symbolic',
|
||||
@ -605,8 +607,6 @@ var MessageListSection = GObject.registerClass({
|
||||
|
||||
let listItem = new St.Bin({
|
||||
child: message,
|
||||
x_fill: true,
|
||||
y_fill: true,
|
||||
layout_manager: new ScaleLayout(),
|
||||
pivot_point: new Graphene.Point({ x: .5, y: .5 }),
|
||||
});
|
||||
|
@ -632,8 +632,7 @@ class SourceActor extends St.Widget {
|
||||
this._actorDestroyed = false;
|
||||
|
||||
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
|
||||
this._iconBin = new St.Bin({ x_fill: true,
|
||||
x_expand: true,
|
||||
this._iconBin = new St.Bin({ x_expand: true,
|
||||
height: size * scaleFactor,
|
||||
width: size * scaleFactor });
|
||||
|
||||
|
@ -57,9 +57,12 @@ var ModalDialog = GObject.registerClass({
|
||||
coordinate: Clutter.BindCoordinate.ALL });
|
||||
this.add_constraint(constraint);
|
||||
|
||||
this.backgroundStack = new St.Widget({ layout_manager: new Clutter.BinLayout() });
|
||||
this._backgroundBin = new St.Bin({ child: this.backgroundStack,
|
||||
x_fill: true, y_fill: true });
|
||||
this.backgroundStack = new St.Widget({
|
||||
layout_manager: new Clutter.BinLayout(),
|
||||
x_expand: true,
|
||||
y_expand: true,
|
||||
});
|
||||
this._backgroundBin = new St.Bin({ child: this.backgroundStack });
|
||||
this._monitorConstraint = new Layout.MonitorConstraint();
|
||||
this._backgroundBin.add_constraint(this._monitorConstraint);
|
||||
this.add_actor(this._backgroundBin);
|
||||
|
@ -111,7 +111,7 @@ class OverviewActor extends St.BoxLayout {
|
||||
this._searchEntry.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS);
|
||||
let searchEntryBin = new St.Bin({
|
||||
child: this._searchEntry,
|
||||
x_align: St.Align.MIDDLE
|
||||
x_align: Clutter.ActorAlign.CENTER,
|
||||
});
|
||||
this.add_actor(searchEntryBin);
|
||||
|
||||
|
@ -29,17 +29,17 @@ var PadChooser = GObject.registerClass({
|
||||
super._init({
|
||||
style_class: 'pad-chooser-button',
|
||||
toggle_mode: true,
|
||||
x_fill: false,
|
||||
y_fill: false,
|
||||
x_align: St.Align.MIDDLE,
|
||||
y_align: St.Align.MIDDLE
|
||||
});
|
||||
this.currentDevice = device;
|
||||
this._padChooserMenu = null;
|
||||
|
||||
let arrow = new St.Icon({ style_class: 'popup-menu-arrow',
|
||||
let arrow = new St.Icon({
|
||||
style_class: 'popup-menu-arrow',
|
||||
icon_name: 'pan-down-symbolic',
|
||||
accessible_role: Atk.Role.ARROW });
|
||||
accessible_role: Atk.Role.ARROW,
|
||||
x_align: Clutter.ActorAlign.CENTER,
|
||||
y_align: Clutter.ActorAlign.CENTER,
|
||||
});
|
||||
this.set_child(arrow);
|
||||
this._ensureMenu(groupDevices);
|
||||
|
||||
|
@ -10,15 +10,17 @@ const PopupMenu = imports.ui.popupMenu;
|
||||
var ButtonBox = GObject.registerClass(
|
||||
class ButtonBox extends St.Widget {
|
||||
_init(params) {
|
||||
params = Params.parse(params, { style_class: 'panel-button' }, true);
|
||||
params = Params.parse(params, {
|
||||
style_class: 'panel-button',
|
||||
x_expand: true,
|
||||
y_expand: true,
|
||||
}, true);
|
||||
|
||||
super._init(params);
|
||||
|
||||
this._delegate = this;
|
||||
|
||||
this.container = new St.Bin({ y_fill: true,
|
||||
x_fill: true,
|
||||
child: this });
|
||||
this.container = new St.Bin({ child: this });
|
||||
|
||||
this.connect('style-changed', this._onStyleChanged.bind(this));
|
||||
this.connect('destroy', this._onDestroy.bind(this));
|
||||
|
@ -340,7 +340,6 @@ var PopupSwitchMenuItem = GObject.registerClass({
|
||||
this.add_child(this.label);
|
||||
|
||||
this._statusBin = new St.Bin({
|
||||
x_align: St.Align.END,
|
||||
x_expand: true,
|
||||
});
|
||||
this._statusBin.set_x_align(Clutter.ActorAlign.END);
|
||||
@ -442,12 +441,14 @@ var PopupMenuBase = class {
|
||||
this.focusActor = sourceActor;
|
||||
this._parent = null;
|
||||
|
||||
if (styleClass !== undefined) {
|
||||
this.box = new St.BoxLayout({ style_class: styleClass,
|
||||
vertical: true });
|
||||
} else {
|
||||
this.box = new St.BoxLayout({ vertical: true });
|
||||
}
|
||||
this.box = new St.BoxLayout({
|
||||
vertical: true,
|
||||
x_expand: true,
|
||||
y_expand: true,
|
||||
});
|
||||
|
||||
if (styleClass !== undefined)
|
||||
this.box.style_class = styleClass;
|
||||
this.length = 0;
|
||||
|
||||
this.isOpen = false;
|
||||
@ -797,10 +798,7 @@ var PopupMenu = class extends PopupMenuBase {
|
||||
this._arrowAlignment = arrowAlignment;
|
||||
this._arrowSide = arrowSide;
|
||||
|
||||
this._boxPointer = new BoxPointer.BoxPointer(arrowSide,
|
||||
{ x_fill: true,
|
||||
y_fill: true,
|
||||
x_align: St.Align.START });
|
||||
this._boxPointer = new BoxPointer.BoxPointer(arrowSide);
|
||||
this.actor = this._boxPointer;
|
||||
this.actor._delegate = this;
|
||||
this.actor.style_class = 'popup-menu-boxpointer';
|
||||
|
@ -98,8 +98,7 @@ var NotificationsBox = GObject.registerClass({
|
||||
style_class: 'screen-shield-notifications-container'
|
||||
});
|
||||
|
||||
this._scrollView = new St.ScrollView({ x_fill: false, x_align: St.Align.START,
|
||||
hscrollbar_policy: St.PolicyType.NEVER });
|
||||
this._scrollView = new St.ScrollView({ hscrollbar_policy: St.PolicyType.NEVER });
|
||||
this._notificationBox = new St.BoxLayout({ vertical: true,
|
||||
style_class: 'screen-shield-notifications-container' });
|
||||
this._scrollView.add_actor(this._notificationBox);
|
||||
@ -165,9 +164,7 @@ var NotificationsBox = GObject.registerClass({
|
||||
|
||||
_makeNotificationDetailedSource(source, box) {
|
||||
let sourceActor = new MessageTray.SourceActor(source, SUMMARY_ICON_SIZE);
|
||||
let sourceBin = new St.Bin({ y_align: St.Align.START,
|
||||
x_align: St.Align.START,
|
||||
child: sourceActor });
|
||||
let sourceBin = new St.Bin({ child: sourceActor });
|
||||
box.add(sourceBin);
|
||||
|
||||
let textBox = new St.BoxLayout({ vertical: true });
|
||||
@ -355,9 +352,11 @@ var Arrow = GObject.registerClass(
|
||||
class ScreenShieldArrow extends St.Bin {
|
||||
_init(params) {
|
||||
super._init(params);
|
||||
this.x_fill = this.y_fill = true;
|
||||
|
||||
this._drawingArea = new St.DrawingArea();
|
||||
this._drawingArea = new St.DrawingArea({
|
||||
x_expand: true,
|
||||
y_expand: true,
|
||||
});
|
||||
this._drawingArea.connect('repaint', this._drawArrow.bind(this));
|
||||
this.child = this._drawingArea;
|
||||
|
||||
|
@ -43,8 +43,6 @@ class SearchResult extends St.Button {
|
||||
reactive: true,
|
||||
can_focus: true,
|
||||
track_hover: true,
|
||||
x_align: St.Align.START,
|
||||
y_fill: true
|
||||
});
|
||||
}
|
||||
|
||||
@ -68,12 +66,13 @@ class ListSearchResult extends SearchResult {
|
||||
super._init(provider, metaInfo, resultsView);
|
||||
|
||||
this.style_class = 'list-search-result';
|
||||
this.x_fill = true;
|
||||
|
||||
let content = new St.BoxLayout({
|
||||
style_class: 'list-search-result-content',
|
||||
vertical: false,
|
||||
x_align: Clutter.ActorAlign.START,
|
||||
x_expand: true,
|
||||
y_expand: true,
|
||||
});
|
||||
this.set_child(content);
|
||||
|
||||
@ -142,7 +141,12 @@ class GridSearchResult extends SearchResult {
|
||||
|
||||
this.icon = new IconGrid.BaseIcon(this.metaInfo['name'],
|
||||
{ createIcon: this.metaInfo['createIcon'] });
|
||||
let content = new St.Bin({ child: this.icon });
|
||||
let content = new St.Bin({
|
||||
child: this.icon,
|
||||
x_align: Clutter.ActorAlign.START,
|
||||
x_expand: true,
|
||||
y_expand: true,
|
||||
});
|
||||
this.set_child(content);
|
||||
this.label_actor = this.icon.label;
|
||||
}
|
||||
@ -166,7 +170,7 @@ var SearchResultsBase = GObject.registerClass({
|
||||
this._terms = [];
|
||||
this._focusChild = null;
|
||||
|
||||
this._resultDisplayBin = new St.Bin({ x_fill: true });
|
||||
this._resultDisplayBin = new St.Bin();
|
||||
this.add_child(this._resultDisplayBin);
|
||||
|
||||
let separator = new St.Widget({ style_class: 'search-section-separator' });
|
||||
@ -353,7 +357,7 @@ class GridSearchResults extends SearchResultsBase {
|
||||
this._grid = new IconGrid.IconGrid({ rowLimit: MAX_GRID_SEARCH_RESULTS_ROWS,
|
||||
xAlign: St.Align.START });
|
||||
|
||||
this._bin = new St.Bin({ x_align: St.Align.MIDDLE });
|
||||
this._bin = new St.Bin({ x_align: Clutter.ActorAlign.CENTER });
|
||||
this._bin.set_child(this._grid);
|
||||
|
||||
this._resultDisplayBin.set_child(this._bin);
|
||||
@ -427,8 +431,11 @@ var SearchResultsView = GObject.registerClass({
|
||||
_init() {
|
||||
super._init({ name: 'searchResults', vertical: true });
|
||||
|
||||
this._content = new MaxWidthBox({ name: 'searchResultsContent',
|
||||
vertical: true });
|
||||
this._content = new MaxWidthBox({
|
||||
name: 'searchResultsContent',
|
||||
vertical: true,
|
||||
x_expand: true,
|
||||
});
|
||||
|
||||
this._scrollView = new St.ScrollView({
|
||||
overlay_scrollbars: true,
|
||||
|
@ -53,8 +53,6 @@ var ListItem = GObject.registerClass({
|
||||
can_focus: true,
|
||||
child: layout,
|
||||
reactive: true,
|
||||
x_align: St.Align.START,
|
||||
x_fill: true
|
||||
});
|
||||
|
||||
this._app = app;
|
||||
@ -65,10 +63,12 @@ var ListItem = GObject.registerClass({
|
||||
child: this._icon });
|
||||
layout.add(iconBin);
|
||||
|
||||
this._nameLabel = new St.Label({ text: this._app.get_name(),
|
||||
style_class: 'mount-dialog-app-list-item-name' });
|
||||
let labelBin = new St.Bin({ y_align: St.Align.MIDDLE,
|
||||
child: this._nameLabel });
|
||||
this._nameLabel = new St.Label({
|
||||
text: this._app.get_name(),
|
||||
style_class: 'mount-dialog-app-list-item-name',
|
||||
y_align: Clutter.ActorAlign.CENTER,
|
||||
});
|
||||
let labelBin = new St.Bin({ child: this._nameLabel });
|
||||
layout.add(labelBin);
|
||||
}
|
||||
|
||||
|
@ -55,9 +55,7 @@ var UnlockDialog = GObject.registerClass({
|
||||
this._otherUserButton = new St.Button({ style_class: 'login-dialog-not-listed-button',
|
||||
can_focus: true,
|
||||
child: otherUserLabel,
|
||||
reactive: true,
|
||||
x_align: St.Align.START,
|
||||
x_fill: false });
|
||||
reactive: true });
|
||||
this._otherUserButton.connect('clicked', this._otherUserClicked.bind(this));
|
||||
this._promptBox.add_child(this._otherUserButton);
|
||||
} else {
|
||||
|
@ -309,11 +309,8 @@ var ViewSelector = GObject.registerClass({
|
||||
_addPage(actor, name, a11yIcon, params) {
|
||||
params = Params.parse(params, { a11yFocus: null });
|
||||
|
||||
let page = new St.Bin({ child: actor,
|
||||
x_align: St.Align.START,
|
||||
y_align: St.Align.START,
|
||||
x_fill: true,
|
||||
y_fill: true });
|
||||
let page = new St.Bin({ child: actor });
|
||||
|
||||
if (params.a11yFocus)
|
||||
Main.ctrlAltTabManager.addGroup(params.a11yFocus, name, a11yIcon);
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user