js: Set BoxLayout orientation

Use new `orientation` property instead of `vertical`.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3614>
This commit is contained in:
Florian Müllner 2025-01-27 13:33:57 +01:00
parent 01541929eb
commit b75b4abaf0
34 changed files with 136 additions and 94 deletions

View File

@ -74,7 +74,7 @@ export const AuthList = GObject.registerClass({
}, class AuthList extends St.BoxLayout {
_init() {
super._init({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
style_class: 'login-dialog-auth-list-layout',
x_align: Clutter.ActorAlign.START,
y_align: Clutter.ActorAlign.CENTER,
@ -84,7 +84,7 @@ export const AuthList = GObject.registerClass({
this.add_child(this.label);
this._box = new St.BoxLayout({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
style_class: 'login-dialog-auth-list',
pseudo_class: 'expanded',
});

View File

@ -55,7 +55,7 @@ export const AuthPrompt = GObject.registerClass({
_init(gdmClient, mode) {
super._init({
style_class: 'login-dialog-prompt-layout',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
x_expand: true,
x_align: Clutter.ActorAlign.CENTER,
reactive: true,
@ -146,7 +146,7 @@ export const AuthPrompt = GObject.registerClass({
_initInputRow() {
this._mainBox = new St.BoxLayout({
style_class: 'login-dialog-button-box',
vertical: false,
orientation: Clutter.Orientation.HORIZONTAL,
});
this.add_child(this._mainBox);

View File

@ -51,7 +51,7 @@ export const UserListItem = GObject.registerClass({
}, class UserListItem extends St.Button {
_init(user) {
let layout = new St.BoxLayout({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
x_expand: true,
});
super._init({
@ -174,7 +174,7 @@ const UserList = GObject.registerClass({
});
this._box = new St.BoxLayout({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
style_class: 'login-dialog-user-list',
pseudo_class: 'expanded',
});
@ -434,7 +434,7 @@ export const ConflictingSessionDialog = GObject.registerClass({
let textLayout = new St.BoxLayout({
style_class: 'conflicting-session-dialog-content',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
x_expand: true,
});
@ -521,7 +521,7 @@ export const LoginDialog = GObject.registerClass({
style_class: 'login-dialog-user-selection-box',
x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.CENTER,
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
visible: false,
});
this.add_child(this._userSelectionBox);
@ -558,7 +558,9 @@ export const LoginDialog = GObject.registerClass({
this._userSelectionBox.add_child(this._notListedButton);
const bannerBox = new St.BoxLayout({vertical: true});
const bannerBox = new St.BoxLayout({
orientation: Clutter.Orientation.VERTICAL,
});
this._bannerView = new St.ScrollView({
style_class: 'login-dialog-banner-view',

View File

@ -1378,7 +1378,7 @@ class OsdBreakCountdownLabel extends St.Widget {
});
this._box = new St.BoxLayout({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
});
this.add_child(this._box);

View File

@ -667,7 +667,7 @@ class AppIcon extends St.BoxLayout {
_init(app) {
super._init({
style_class: 'alt-tab-app',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
});
this.app = app;
@ -919,7 +919,7 @@ class ThumbnailSwitcher extends SwitcherPopup.SwitcherList {
for (let i = 0; i < windows.length; i++) {
const box = new St.BoxLayout({
style_class: 'thumbnail-box',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
});
let bin = new St.Bin({style_class: 'thumbnail'});
@ -1001,7 +1001,7 @@ class WindowIcon extends St.BoxLayout {
_init(window, mode) {
super._init({
style_class: 'alt-tab-app',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
});
this.window = window;

View File

@ -610,7 +610,7 @@ var BaseAppView = GObject.registerClass({
scrollContainer._delegate = this;
this._box = new St.BoxLayout({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
x_expand: true,
y_expand: true,
});
@ -2527,7 +2527,7 @@ export const AppFolderDialog = GObject.registerClass({
y_expand: true,
x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.CENTER,
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
});
this.child = new St.Bin({

View File

@ -98,7 +98,7 @@ const AudioDeviceSelectionDialog = GObject.registerClass({
_addDevice(device) {
const box = new St.BoxLayout({
style_class: 'audio-selection-device-box',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
});
box.connect('notify::height', () => {
const laters = global.compositor.get_laters();

View File

@ -909,7 +909,10 @@ class NotificationSection extends MessageList.MessageListSection {
const Placeholder = GObject.registerClass(
class Placeholder extends St.BoxLayout {
_init() {
super._init({style_class: 'message-list-placeholder', vertical: true});
super._init({
style_class: 'message-list-placeholder',
orientation: Clutter.Orientation.VERTICAL,
});
this._date = new Date();
this._icon = new St.Icon({icon_name: 'no-notifications-symbolic'});
@ -954,7 +957,7 @@ class CalendarMessageList extends St.Widget {
this.add_child(this._placeholder);
let box = new St.BoxLayout({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
x_expand: true,
y_expand: true,
});
@ -1009,7 +1012,7 @@ class CalendarMessageList extends St.Widget {
this._sectionList = new St.BoxLayout({
style_class: 'message-list-sections',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
x_expand: true,
y_expand: true,
});

View File

@ -31,7 +31,7 @@ class KeyringDialog extends ModalDialog.ModalDialog {
let passwordBox = new St.BoxLayout({
style_class: 'prompt-dialog-password-layout',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
});
this._passwordEntry = new St.PasswordEntry({
@ -59,7 +59,7 @@ class KeyringDialog extends ModalDialog.ModalDialog {
this.prompt.set_password_actor(this._passwordEntry.clutter_text);
this.prompt.set_confirm_actor(this._confirmEntry.clutter_text);
let warningBox = new St.BoxLayout({vertical: true});
let warningBox = new St.BoxLayout({orientation: Clutter.Orientation.VERTICAL});
let capsLockWarning = new ShellEntry.CapsLockWarning();
let syncCapsLockWarningVisibility = () => {

View File

@ -64,7 +64,7 @@ const AuthenticationDialog = GObject.registerClass({
let userBox = new St.BoxLayout({
style_class: 'polkit-dialog-user-layout',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
});
bodyContent.add_child(userBox);
@ -87,7 +87,7 @@ const AuthenticationDialog = GObject.registerClass({
let passwordBox = new St.BoxLayout({
style_class: 'prompt-dialog-password-layout',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
});
this._passwordEntry = new St.PasswordEntry({
@ -104,7 +104,7 @@ const AuthenticationDialog = GObject.registerClass({
GObject.BindingFlags.SYNC_CREATE);
passwordBox.add_child(this._passwordEntry);
let warningBox = new St.BoxLayout({vertical: true});
let warningBox = new St.BoxLayout({orientation: Clutter.Orientation.VERTICAL});
let capsLockWarning = new ShellEntry.CapsLockWarning();
this._passwordEntry.bind_property('visible',

View File

@ -172,7 +172,7 @@ class CtrlAltTabSwitcher extends SwitcherPopup.SwitcherList {
_addIcon(item) {
const box = new St.BoxLayout({
style_class: 'alt-tab-app',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
});
let icon = item.iconActor;

View File

@ -62,7 +62,7 @@ class TodayButton extends St.Button {
});
const hbox = new St.BoxLayout({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
x_expand: true,
});
this.child = hbox;
@ -117,7 +117,7 @@ class EventsSection extends St.Button {
x_expand: true,
child: new St.BoxLayout({
style_class: 'events-box',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
x_expand: true,
}),
});
@ -135,7 +135,7 @@ class EventsSection extends St.Button {
this._eventsList = new St.BoxLayout({
style_class: 'events-list',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
x_expand: true,
});
this.child.add_child(this._eventsList);
@ -271,7 +271,7 @@ class EventsSection extends St.Button {
for (let event of events) {
const box = new St.BoxLayout({
style_class: 'event-box',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
});
box.add_child(new St.Label({
text: event.summary,
@ -552,7 +552,7 @@ class WeatherSection extends St.Button {
let box = new St.BoxLayout({
style_class: 'weather-box',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
x_expand: true,
});
@ -933,7 +933,7 @@ class DateMenuButton extends PanelMenu.Button {
vbox.add_child(this._calendar);
const displaysBox = new St.BoxLayout({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
x_expand: true,
style_class: 'datemenu-displays-box',
});

View File

@ -39,7 +39,7 @@ class Dialog extends St.Widget {
style_class: 'modal-dialog',
x_align: Clutter.ActorAlign.CENTER,
y_align: Clutter.ActorAlign.CENTER,
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
});
// modal dialogs are fixed width and grow vertically; set the request
@ -49,7 +49,7 @@ class Dialog extends St.Widget {
this._dialog.set_offscreen_redirect(Clutter.OffscreenRedirect.ALWAYS);
this.contentLayout = new St.BoxLayout({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
style_class: 'modal-dialog-content-box',
y_expand: true,
});
@ -184,7 +184,7 @@ export const MessageDialogContent = GObject.registerClass({
super._init({
style_class: 'message-dialog-content',
x_expand: true,
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
...params,
});
@ -266,7 +266,7 @@ export const ListSection = GObject.registerClass({
this.list = new St.BoxLayout({
style_class: 'dialog-list-box',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
});
this._listScrollView = new St.ScrollView({
@ -277,7 +277,7 @@ export const ListSection = GObject.registerClass({
super._init({
style_class: 'dialog-list',
x_expand: true,
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
...params,
});
@ -318,7 +318,7 @@ export const ListSectionItem = GObject.registerClass({
this._iconActorBin = new St.Bin();
let textLayout = new St.BoxLayout({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
y_expand: true,
y_align: Clutter.ActorAlign.CENTER,
});

View File

@ -29,7 +29,7 @@ const CandidateArea = GObject.registerClass({
}, class CandidateArea extends St.BoxLayout {
_init() {
super._init({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
reactive: true,
visible: false,
});
@ -158,7 +158,7 @@ class IbusCandidatePopup extends BoxPointer.BoxPointer {
const box = new St.BoxLayout({
style_class: 'candidate-popup-content',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
});
this.bin.set_child(box);

View File

@ -74,7 +74,7 @@ class BaseIcon extends Shell.SquareBin {
super._init({style_class: styleClass});
this._box = new St.BoxLayout({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
x_expand: true,
y_expand: true,
});

View File

@ -124,7 +124,7 @@ class Suggestions extends St.BoxLayout {
_init() {
super._init({
style_class: 'word-suggestions',
vertical: false,
orientation: Clutter.Orientation.HORIZONTAL,
x_align: Clutter.ActorAlign.CENTER,
});
this.show();
@ -434,7 +434,7 @@ const Key = GObject.registerClass({
_getExtendedKeys() {
this._extendedKeyboard = new St.BoxLayout({
style_class: 'key-container',
vertical: false,
orientation: Clutter.Orientation.HORIZONTAL,
});
for (let i = 0; i < this._extendedKeys.length; ++i) {
let extendedKey = this._extendedKeys[i];
@ -1185,7 +1185,7 @@ export const Keyboard = GObject.registerClass({
// the locale setting in order to avoid flipping the
// keyboard on RTL locales.
text_direction: Clutter.TextDirection.LTR,
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
});
this._focusInExtendedKeys = false;
this._emojiActive = false;

View File

@ -277,7 +277,7 @@ export const LayoutManager = GObject.registerClass({
this.panelBox = new St.BoxLayout({
name: 'panelBox',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
});
this.addChrome(this.panelBox, {
affectsStruts: true,

View File

@ -136,7 +136,7 @@ const Notebook = GObject.registerClass({
}, class Notebook extends St.BoxLayout {
_init() {
super._init({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
y_expand: true,
});
@ -308,7 +308,7 @@ class ObjLink extends St.Button {
const Result = GObject.registerClass(
class Result extends St.BoxLayout {
_init(lookingGlass, command, o, index) {
super._init({vertical: true});
super._init({orientation: Clutter.Orientation.VERTICAL});
this.index = index;
this.o = o;
@ -331,7 +331,10 @@ class Result extends St.BoxLayout {
const WindowList = GObject.registerClass({
}, class WindowList extends St.BoxLayout {
_init(lookingGlass) {
super._init({name: 'LookingGlassWindows', vertical: true});
super._init({
name: 'LookingGlassWindows',
orientation: Clutter.Orientation.VERTICAL,
});
let tracker = Shell.WindowTracker.get_default();
this._updateId = Main.initializeDeferredWork(this, this._updateWindowList.bind(this));
global.display.connect('window-created', this._updateWindowList.bind(this));
@ -354,16 +357,25 @@ const WindowList = GObject.registerClass({
metaWindow.connect('unmanaged', this._updateWindowList.bind(this));
metaWindow._lookingGlassManaged = true;
}
let box = new St.BoxLayout({vertical: true, style_class: 'lg-window'});
const box = new St.BoxLayout({
orientation: Clutter.Orientation.VERTICAL,
style_class: 'lg-window',
});
this.add_child(box);
let header = new St.BoxLayout({vertical: true, style_class: 'lg-window-name'});
const header = new St.BoxLayout({
orientation: Clutter.Orientation.VERTICAL,
style_class: 'lg-window-name',
});
box.add_child(header);
let windowLink = new ObjLink(this._lookingGlass, metaWindow, metaWindow.title);
header.add_child(windowLink);
let propsBox = new St.BoxLayout({vertical: true, style_class: 'lg-window-props-box'});
const propsBox = new St.BoxLayout({
orientation: Clutter.Orientation.VERTICAL,
style_class: 'lg-window-props-box',
});
box.add_child(propsBox);
propsBox.add_child(new St.Label({text: `wmclass: ${metaWindow.get_wm_class()}`}));
let app = tracker.get_window_app(metaWindow);
@ -401,7 +413,7 @@ class ObjInspector extends St.ScrollView {
this._parentList = [];
this._container = new St.BoxLayout({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
x_expand: true,
y_expand: true,
});
@ -589,7 +601,7 @@ export const Inspector = GObject.registerClass({
const eventHandler = new St.BoxLayout({
name: 'LookingGlassDialog',
vertical: false,
orientation: Clutter.Orientation.HORIZONTAL,
reactive: true,
});
this._eventHandler = eventHandler;
@ -719,7 +731,10 @@ export const Inspector = GObject.registerClass({
const Extensions = GObject.registerClass({
}, class Extensions extends St.BoxLayout {
_init(lookingGlass) {
super._init({vertical: true, name: 'LookingGlassExtensions'});
super._init({
orientation: Clutter.Orientation.VERTICAL,
name: 'LookingGlassExtensions',
});
this._lookingGlass = lookingGlass;
this._noExtensions = new St.Label({
@ -728,7 +743,7 @@ const Extensions = GObject.registerClass({
});
this._numExtensions = 0;
this._extensionsList = new St.BoxLayout({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
style_class: 'lg-extensions-list',
});
this._extensionsList.add_child(this._noExtensions);
@ -779,7 +794,9 @@ const Extensions = GObject.registerClass({
if (shouldShow) {
let errors = extension.errors;
let errorDisplay = new St.BoxLayout({vertical: true});
const errorDisplay = new St.BoxLayout({
orientation: Clutter.Orientation.VERTICAL,
});
if (errors && errors.length) {
for (let i = 0; i < errors.length; i++)
errorDisplay.add_child(new St.Label({text: errors[i]}));
@ -823,7 +840,10 @@ const Extensions = GObject.registerClass({
}
_createExtensionDisplay(extension) {
let box = new St.BoxLayout({style_class: 'lg-extension', vertical: true});
const box = new St.BoxLayout({
style_class: 'lg-extension',
orientation: Clutter.Orientation.VERTICAL,
});
box._extension = extension;
let name = new St.Label({
style_class: 'lg-extension-name',
@ -1003,9 +1023,11 @@ class ActorTreeViewer extends St.BoxLayout {
this._lookingGlass.inspectObject(actor, button);
});
const mainContainer = new St.BoxLayout({vertical: true});
const mainContainer = new St.BoxLayout({
orientation: Clutter.Orientation.VERTICAL,
});
const childrenContainer = new St.BoxLayout({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
style: 'padding: 0 0 0 18px',
});
@ -1244,7 +1266,7 @@ class DebugFlags extends St.BoxLayout {
_init() {
super._init({
name: 'LookingGlassDebugFlags',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
x_align: Clutter.ActorAlign.CENTER,
});
@ -1305,7 +1327,7 @@ class LookingGlass extends St.BoxLayout {
super._init({
name: 'LookingGlassDialog',
style_class: 'lg-dialog',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
visible: false,
reactive: true,
});
@ -1382,12 +1404,15 @@ class LookingGlass extends St.BoxLayout {
toolbar.add_child(emptyBox);
toolbar.add_child(notebook.tabControls);
this._evalBox = new St.BoxLayout({name: 'LookingGlassEvaluator', vertical: true});
this._evalBox = new St.BoxLayout({
name: 'LookingGlassEvaluator',
orientation: Clutter.Orientation.VERTICAL,
});
notebook.appendPage('Evaluator', this._evalBox);
this._resultsArea = new St.BoxLayout({
style_class: 'evaluator-results',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
y_expand: true,
});
this._evalBox.add_child(this._resultsArea);

View File

@ -425,7 +425,7 @@ export const Message = GObject.registerClass({
this._useBodyMarkup = false;
let vbox = new St.BoxLayout({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
x_expand: true,
});
this.set_child(vbox);
@ -462,7 +462,7 @@ export const Message = GObject.registerClass({
const contentBox = new St.BoxLayout({
style_class: 'message-content',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
x_expand: true,
});
hbox.add_child(contentBox);
@ -677,13 +677,13 @@ export const MessageListSection = GObject.registerClass({
super._init({
style_class: 'message-list-section',
clip_to_allocation: true,
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
x_expand: true,
});
this._list = new St.BoxLayout({
style_class: 'message-list-section-list',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
});
this.add_child(this._list);

View File

@ -14,7 +14,7 @@ class OsdMonitorLabel extends St.Widget {
this._monitor = monitor;
this._box = new St.BoxLayout({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
});
this.add_child(this._box);

View File

@ -34,7 +34,7 @@ class OsdWindow extends Clutter.Actor {
this._hbox.add_child(this._icon);
this._vbox = new St.BoxLayout({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
y_align: Clutter.ActorAlign.CENTER,
});
this._hbox.add_child(this._vbox);

View File

@ -31,7 +31,7 @@ class OverviewActor extends St.BoxLayout {
/* Translators: This is the main view to select
activities. See also note for "Activities" string. */
accessible_name: _('Overview'),
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
});
this.add_constraint(new LayoutManager.MonitorConstraint({primary: true}));

View File

@ -627,7 +627,7 @@ export const PadOsd = GObject.registerClass({
_init(padDevice, settings, imagePath, editionMode, monitorIndex) {
super._init({
style_class: 'pad-osd-window',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
x_expand: true,
y_expand: true,
reactive: true,
@ -678,7 +678,7 @@ export const PadOsd = GObject.registerClass({
this._titleBox = new St.BoxLayout({
style_class: 'pad-osd-title-box',
vertical: false,
orientation: Clutter.Orientation.HORIZONTAL,
x_expand: false,
x_align: Clutter.ActorAlign.CENTER,
});
@ -686,7 +686,7 @@ export const PadOsd = GObject.registerClass({
const labelBox = new St.BoxLayout({
style_class: 'pad-osd-title-menu-box',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
});
this._titleBox.add_child(labelBox);

View File

@ -688,7 +688,7 @@ export class PopupMenuBase extends Signals.EventEmitter {
this._parent = null;
this.box = new St.BoxLayout({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
x_expand: true,
y_expand: true,
});

View File

@ -109,7 +109,7 @@ export const QuickToggle = GObject.registerClass({
y_align: Clutter.ActorAlign.CENTER,
x_align: Clutter.ActorAlign.START,
x_expand: true,
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
});
titleBox.add_child(this._title);
titleBox.add_child(this._subtitle);

View File

@ -38,7 +38,7 @@ class IconLabelButton extends St.Button {
super._init(params);
this._container = new St.BoxLayout({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
style_class: 'icon-label-button-container',
});
this.set_child(this._container);
@ -1185,7 +1185,7 @@ export const ScreenshotUI = GObject.registerClass({
style_class: 'screenshot-ui-panel',
y_align: Clutter.ActorAlign.END,
y_expand: true,
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
offscreen_redirect: Clutter.OffscreenRedirect.AUTOMATIC_FOR_OPACITY,
});
this._primaryMonitorBin.add_child(this._panel);

View File

@ -75,7 +75,7 @@ class ListSearchResult extends SearchResult {
let content = new St.BoxLayout({
style_class: 'list-search-result-content',
vertical: false,
orientation: Clutter.Orientation.HORIZONTAL,
x_align: Clutter.ActorAlign.START,
x_expand: true,
y_expand: true,
@ -157,7 +157,10 @@ const SearchResultsBase = GObject.registerClass({
},
}, class SearchResultsBase extends St.BoxLayout {
_init(provider, resultsView) {
super._init({style_class: 'search-section', vertical: true});
super._init({
style_class: 'search-section',
orientation: Clutter.Orientation.VERTICAL,
});
this.provider = provider;
this._resultsView = resultsView;
@ -300,7 +303,7 @@ class ListSearchResults extends SearchResultsBase {
this._content = new St.BoxLayout({
style_class: 'list-search-results',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
x_expand: true,
});
this._container.add_child(this._content);
@ -555,7 +558,7 @@ export const SearchResultsView = GObject.registerClass({
_init() {
super._init({
name: 'searchResults',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
x_expand: true,
y_expand: true,
});
@ -565,7 +568,7 @@ export const SearchResultsView = GObject.registerClass({
this._content = new MaxWidthBox({
name: 'searchResultsContent',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
x_expand: true,
});
@ -916,7 +919,7 @@ class ProviderInfo extends St.Button {
});
this._content = new St.BoxLayout({
vertical: false,
orientation: Clutter.Orientation.HORIZONTAL,
style_class: 'list-search-provider-content',
});
this.set_child(this._content);
@ -928,7 +931,7 @@ class ProviderInfo extends St.Button {
const detailsBox = new St.BoxLayout({
style_class: 'list-search-provider-details',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
x_expand: true,
});

View File

@ -350,7 +350,7 @@ const ShellMountPasswordDialog = GObject.registerClass({
}
curGridRow += 1;
let warningBox = new St.BoxLayout({vertical: true});
let warningBox = new St.BoxLayout({orientation: Clutter.Orientation.VERTICAL});
let capsLockWarning = new ShellEntry.CapsLockWarning();
warningBox.add_child(capsLockWarning);

View File

@ -49,7 +49,7 @@ const BackgroundAppMenuItem = GObject.registerClass({
this.app = app;
const box = new St.BoxLayout({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
x_expand: true,
x_align: Clutter.ActorAlign.START,
y_align: Clutter.ActorAlign.CENTER,

View File

@ -109,7 +109,7 @@ const DiscreteItem = GObject.registerClass({
_addLevelButton(key, labelText, iconName) {
const box = new St.BoxLayout({
style_class: 'keyboard-brightness-level',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
x_expand: true,
});

View File

@ -121,7 +121,9 @@ class InputSourceSwitcher extends SwitcherPopup.SwitcherList {
}
_addIcon(item) {
let box = new St.BoxLayout({vertical: true});
const box = new St.BoxLayout({
orientation: Clutter.Orientation.VERTICAL,
});
const symbol = new St.Bin({
style_class: 'input-source-switcher-symbol',

View File

@ -102,7 +102,7 @@ class SwitchMonitorSwitcher extends SwitcherPopup.SwitcherList {
_addIcon(item) {
const box = new St.BoxLayout({
style_class: 'alt-tab-app',
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
});
const icon = new St.Icon({

View File

@ -392,7 +392,7 @@ export const SwitcherList = GObject.registerClass({
this._list = new St.BoxLayout({
style_class: 'switcher-list-item-container',
vertical: false,
orientation: Clutter.Orientation.HORIZONTAL,
x_expand: true,
y_expand: true,
});

View File

@ -35,12 +35,12 @@ const NotificationsBox = GObject.registerClass({
}, class NotificationsBox extends St.BoxLayout {
_init() {
super._init({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
name: 'unlockDialogNotifications',
});
this._notificationBox = new St.BoxLayout({
vertical: true,
orientation: Clutter.Orientation.VERTICAL,
style_class: 'unlock-dialog-notifications-container',
});
@ -123,7 +123,9 @@ const NotificationsBox = GObject.registerClass({
source.bind_property('icon', iconActor, 'gicon', GObject.BindingFlags.SYNC_CREATE);
box.add_child(iconActor);
let textBox = new St.BoxLayout({vertical: true});
const textBox = new St.BoxLayout({
orientation: Clutter.Orientation.VERTICAL,
});
box.add_child(textBox);
let title = new St.Label({
@ -324,7 +326,10 @@ const NotificationsBox = GObject.registerClass({
const Clock = GObject.registerClass(
class UnlockDialogClock extends St.BoxLayout {
_init() {
super._init({style_class: 'unlock-dialog-clock', vertical: true});
super._init({
style_class: 'unlock-dialog-clock',
orientation: Clutter.Orientation.VERTICAL,
});
this._time = new St.Label({
style_class: 'unlock-dialog-clock-time',
@ -554,7 +559,9 @@ export const UnlockDialog = GObject.registerClass({
// Authentication & Clock stack
this._stack = new Shell.Stack();
this._promptBox = new St.BoxLayout({vertical: true});
this._promptBox = new St.BoxLayout({
orientation: Clutter.Orientation.VERTICAL,
});
this._promptBox.set_pivot_point(0.5, 0.5);
this._promptBox.hide();
this._stack.add_child(this._promptBox);