diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js index 8a9312349650b8bc96aeffd97e689122e6fad758..62a65725e712e2a65196c0e7cc5d02ea387a927e 100644 --- a/js/gdm/authPrompt.js +++ b/js/gdm/authPrompt.js @@ -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, }); @@ -164,9 +162,9 @@ var AuthPrompt = GObject.registerClass({ can_focus: true, label: _("Cancel"), x_expand: true, + x_align: Clutter.ActorAlign.START, + y_align: Clutter.ActorAlign.END, }); - this.cancelButton.set_x_align(Clutter.ActorAlign.START); - this.cancelButton.set_y_align(Clutter.ActorAlign.END); this.cancelButton.connect('clicked', () => this.cancel()); this._buttonBox.add_child(this.cancelButton); @@ -177,9 +175,9 @@ var AuthPrompt = GObject.registerClass({ reactive: true, can_focus: true, label: _("Next"), + x_align: Clutter.ActorAlign.END, + y_align: Clutter.ActorAlign.END, }); - this.nextButton.set_x_align(Clutter.ActorAlign.END); - this.nextButton.set_y_align(Clutter.ActorAlign.END); this.nextButton.connect('clicked', () => this.emit('next')); this.nextButton.add_style_pseudo_class('default'); this._buttonBox.add_child(this.nextButton); @@ -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); } } diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js index 5b40405d7aa61c507102d74792a237216a2f22d6..96d8453b70cf0d6236e954220865e24f9ea47a1e 100644 --- a/js/gdm/loginDialog.js +++ b/js/gdm/loginDialog.js @@ -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', - button_mask: St.ButtonMask.ONE | St.ButtonMask.THREE, - can_focus: true, - child: notListedLabel, - reactive: true, - x_align: St.Align.START, - x_fill: true }); + 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, + }); this._notListedButton.connect('clicked', this._hideUserListAskForUsernameAndBeginVerification.bind(this)); diff --git a/js/misc/util.js b/js/misc/util.js index 541f1876bdcc8c6f9bf15e3d76b5ae53a5be130f..bdffffc529ca6b32eafb5a88870232be486f5ac1 100644 --- a/js/misc/util.js +++ b/js/misc/util.js @@ -346,19 +346,13 @@ function insertSorted(array, val, cmp) { var CloseButton = GObject.registerClass( class CloseButton extends St.Button { _init(boxpointer) { - super._init({ style_class: 'notification-close' }); - - // This is a bit tricky. St.Bin has its own x-align/y-align properties - // that compete with Clutter's properties. This should be fixed for - // Clutter 2.0. Since St.Bin doesn't define its own setters, the - // setters are a workaround to get Clutter's version. - this.set_x_align(Clutter.ActorAlign.END); - this.set_y_align(Clutter.ActorAlign.START); - - // XXX Clutter 2.0 workaround: ClutterBinLayout needs expand - // to respect the alignments. - this.set_x_expand(true); - this.set_y_expand(true); + super._init({ + style_class: 'notification-close', + x_expand: true, + y_expand: true, + x_align: Clutter.ActorAlign.END, + y_align: Clutter.ActorAlign.START, + }); this._boxPointer = boxpointer; if (boxpointer) diff --git a/js/ui/altTab.js b/js/ui/altTab.js index 3ec807c49493d8c29227ca06e155bf0a60e2528d..1c4a239984b3c4da24d7dd38af3749d9babc782e 100644 --- a/js/ui/altTab.js +++ b/js/ui/altTab.js @@ -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 { diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index ee0beabe97d9b5115dc049e89ba68be1b73a277e..43b1860f8057b168e63f1a91a933bb49a3ba6a93 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -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; diff --git a/js/ui/calendar.js b/js/ui/calendar.js index c187e96d3791b69a371a89e53fcd6e8efd6d98d6..ef13289c7b6f370a73c35e993e981f1692fa3e67 100644 --- a/js/ui/calendar.js +++ b/js/ui/calendar.js @@ -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,15 +1078,16 @@ 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); - this._clearButton = new St.Button({ style_class: 'message-list-clear-button button', - label: _("Clear"), - can_focus: true }); - this._clearButton.set_x_align(Clutter.ActorAlign.END); + this._clearButton = new St.Button({ + style_class: 'message-list-clear-button button', + label: _('Clear'), + can_focus: true, + x_align: Clutter.ActorAlign.END, + }); this._clearButton.connect('clicked', () => { this._sectionList.get_children().forEach(s => s.clear()); }); @@ -1098,6 +1099,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)); diff --git a/js/ui/checkBox.js b/js/ui/checkBox.js index c4683e0e5488e448a47538c4f40d5219379163e0..e122fda41edff6acec973b6ce70cecf3d75cfe91 100644 --- a/js/ui/checkBox.js +++ b/js/ui/checkBox.js @@ -11,12 +11,13 @@ 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.set_y_align(Clutter.ActorAlign.START); + this._box = new St.Bin({ + x_expand: true, + y_expand: true, + y_align: Clutter.ActorAlign.START, + }); container.add_actor(this._box); this._label = new St.Label(); diff --git a/js/ui/components/autorunManager.js b/js/ui/components/autorunManager.js index 41e316330fa6a5eddc63ad3c35e6e0c37dd41f7f..82f8b9ecb0ecc6a21d147b069756ea8e6a2ee9f2 100644 --- a/js/ui/components/autorunManager.js +++ b/js/ui/components/autorunManager.js @@ -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' }); diff --git a/js/ui/dash.js b/js/ui/dash.js index e22cbfbb3d477ae3bb127a3a1061d9e69e717223..b033eb2ac7ccc725d8a5ac8998ac7568bd004e6a 100644 --- a/js/ui/dash.js +++ b/js/ui/dash.js @@ -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', - layout_manager: layout, - clip_to_allocation: true }); + super._init({ + name: 'dash', + layout_manager: layout, + clip_to_allocation: true, + y_align: Clutter.ActorAlign.CENTER, + }); } vfunc_allocate(box, flags) { diff --git a/js/ui/dateMenu.js b/js/ui/dateMenu.js index 665fa433e2762df2e5753e143b1f3412f19825fc..960c5f4bdd6baa0ebcc6763efd38cd083a6447c9 100644 --- a/js/ui/dateMenu.js +++ b/js/ui/dateMenu.js @@ -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); diff --git a/js/ui/endSessionDialog.js b/js/ui/endSessionDialog.js index 11c5696dd97153b6ba6721cf11e7bbb213ebe1f8..fc5440eb7266f960f380a3e80bebfa0e62fb6c90 100644 --- a/js/ui/endSessionDialog.js +++ b/js/ui/endSessionDialog.js @@ -272,8 +272,8 @@ class EndSessionDialog extends ModalDialog.ModalDialog { this._iconBin = new St.Bin({ x_expand: true, + x_align: Clutter.ActorAlign.END, }); - this._iconBin.set_x_align(Clutter.ActorAlign.END); mainContentLayout.add_child(this._iconBin); let messageLayout = new St.BoxLayout({ vertical: true, diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js index 782756947b477229982af5d65042d80e7b5060ce..74aac7ad33b0cf474ac8245ea661a9796cd4990c 100644 --- a/js/ui/iconGrid.js +++ b/js/ui/iconGrid.js @@ -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); diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js index 7cdb60d9450a3680ce14cd4f5b46bbb745878326..e12d83a96819033f5471ec4918c907b12fa16d3d 100644 --- a/js/ui/keyboard.js +++ b/js/ui/keyboard.js @@ -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); diff --git a/js/ui/lookingGlass.js b/js/ui/lookingGlass.js index 9238cb82e94898ef69d13e611376cf06d6c4fd47..87f2aa04cd4b70a0078e0d4ffa9ece48a4f3e32f 100644 --- a/js/ui/lookingGlass.js +++ b/js/ui/lookingGlass.js @@ -264,9 +264,9 @@ class ObjLink extends St.Button { reactive: true, track_hover: true, style_class: 'shell-link', - label: text + label: text, + x_align: Clutter.ActorAlign.START, }); - this.set_x_align(Clutter.ActorAlign.START); this.get_child().single_line_mode = true; this._obj = o; @@ -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', - style_class: 'lg-dialog', - vertical: true }); + this._container = new St.BoxLayout({ + name: 'LookingGlassPropertyInspector', + style_class: 'lg-dialog', + vertical: true, + x_expand: true, + y_expand: true, + }); this.add_actor(this._container); this._lookingGlass = lookingGlass; diff --git a/js/ui/magnifier.js b/js/ui/magnifier.js index 316abc6bf0c7a41d8925fa14a90846d76b23aeb3..191784c209144d3d7826719db3d4529026254cd7 100644 --- a/js/ui/magnifier.js +++ b/js/ui/magnifier.js @@ -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 diff --git a/js/ui/messageList.js b/js/ui/messageList.js index 5cac1de75cf96779488d6bd6ac2589798dd0444b..06fa11e212d7ac3b9df534e8c6765d36c591ee99 100644 --- a/js/ui/messageList.js +++ b/js/ui/messageList.js @@ -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 }), }); diff --git a/js/ui/messageTray.js b/js/ui/messageTray.js index 2ec8a14f422af53ca4e7df0a1a24bba6ea4fb224..0c738fd55b2bff8e4a80e4ca2e3b2569f8c72f7d 100644 --- a/js/ui/messageTray.js +++ b/js/ui/messageTray.js @@ -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 }); diff --git a/js/ui/modalDialog.js b/js/ui/modalDialog.js index 1f7c481e1c619f3c4ebe861d1c45c941ac9961a0..f35774407584a227212d84d2a1ae653d425a2574 100644 --- a/js/ui/modalDialog.js +++ b/js/ui/modalDialog.js @@ -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); diff --git a/js/ui/overview.js b/js/ui/overview.js index 6798ee3645d29622283bde6ea2dc54805ab4fa66..e09f523be53a9cb798328ce19e93c26e9bfdd049 100644 --- a/js/ui/overview.js +++ b/js/ui/overview.js @@ -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); diff --git a/js/ui/padOsd.js b/js/ui/padOsd.js index c16e93d01775871f7a613f0c427b721af554fff3..854e0f61edbf4639092424c25c1070d4c8b644a1 100644 --- a/js/ui/padOsd.js +++ b/js/ui/padOsd.js @@ -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', - icon_name: 'pan-down-symbolic', - accessible_role: Atk.Role.ARROW }); + let arrow = new St.Icon({ + style_class: 'popup-menu-arrow', + icon_name: 'pan-down-symbolic', + accessible_role: Atk.Role.ARROW, + x_align: Clutter.ActorAlign.CENTER, + y_align: Clutter.ActorAlign.CENTER, + }); this.set_child(arrow); this._ensureMenu(groupDevices); @@ -735,10 +735,12 @@ var PadOsd = GObject.registerClass({ x_align: Clutter.ActorAlign.CENTER, y_align: Clutter.ActorAlign.CENTER }); this.add_actor(buttonBox); - this._editButton = new St.Button({ label: _("Edit…"), - style_class: 'button', - can_focus: true }); - this._editButton.set_x_align(Clutter.ActorAlign.CENTER); + this._editButton = new St.Button({ + label: _('Edit…'), + style_class: 'button', + can_focus: true, + x_align: Clutter.ActorAlign.CENTER, + }); this._editButton.connect('clicked', () => { this.setEditionMode(true); }); diff --git a/js/ui/panelMenu.js b/js/ui/panelMenu.js index 8c4c26423f489156964cf1d329030c30767db1f4..cbb10e53856080d3e22c9cbcf54f1683f10f80bd 100644 --- a/js/ui/panelMenu.js +++ b/js/ui/panelMenu.js @@ -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)); diff --git a/js/ui/popupMenu.js b/js/ui/popupMenu.js index e96aea8c67eb4be40b49779695d00a60d851bb8c..74c228f56e06322c246f952240f7ca0b507528b3 100644 --- a/js/ui/popupMenu.js +++ b/js/ui/popupMenu.js @@ -340,10 +340,9 @@ var PopupSwitchMenuItem = GObject.registerClass({ this.add_child(this.label); this._statusBin = new St.Bin({ - x_align: St.Align.END, + x_align: Clutter.ActorAlign.END, x_expand: true, }); - this._statusBin.set_x_align(Clutter.ActorAlign.END); this.add_child(this._statusBin); this._statusLabel = new St.Label({ @@ -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'; diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js index 088fceb4c881150a7271d16cd28e7ccf8a65a431..3712c198a4c9b09d00cba75fddb5cefacfcff656 100644 --- a/js/ui/screenShield.js +++ b/js/ui/screenShield.js @@ -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; diff --git a/js/ui/search.js b/js/ui/search.js index 2b0af27cb13e2fa28e75963b5867c64bdda1ad7c..2f3f47d93d5e2c7fb8ada91e4167847ceb5c96b9 100644 --- a/js/ui/search.js +++ b/js/ui/search.js @@ -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, @@ -763,13 +770,15 @@ var ProviderInfo = GObject.registerClass( class ProviderInfo extends St.Button { _init(provider) { this.provider = provider; - super._init({ style_class: 'search-provider-icon', - reactive: true, - can_focus: true, - accessible_name: provider.appInfo.get_name(), - track_hover: true }); + super._init({ + style_class: 'search-provider-icon', + reactive: true, + can_focus: true, + accessible_name: provider.appInfo.get_name(), + track_hover: true, + y_align: Clutter.ActorAlign.START, + }); - this.set_y_align(Clutter.ActorAlign.START); this._content = new St.BoxLayout({ vertical: false, style_class: 'list-search-provider-content' }); this.set_child(this._content); diff --git a/js/ui/shellMountOperation.js b/js/ui/shellMountOperation.js index a5dff2636f2a3d93a47cf5edba574dc5493b6753..968205a458a8b34059eea8d59f18a66ef8de2142 100644 --- a/js/ui/shellMountOperation.js +++ b/js/ui/shellMountOperation.js @@ -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); } diff --git a/js/ui/status/system.js b/js/ui/status/system.js index 8c7b3d1dd9e1f617236c0ae7bc6a121951138e50..8b9a7465285e2ccc896069985d93e7b69e493d15 100644 --- a/js/ui/status/system.js +++ b/js/ui/status/system.js @@ -175,15 +175,16 @@ class Indicator extends PanelMenu.SystemIndicator { } _createActionButton(iconName, accessibleName) { - let icon = new St.Button({ reactive: true, - can_focus: true, - track_hover: true, - accessible_name: accessibleName, - x_expand: true, - style_class: 'system-menu-action' }); - icon.set_x_align(Clutter.ActorAlign.CENTER); - icon.child = new St.Icon({ icon_name: iconName }); - return icon; + return new St.Button({ + child: new St.Icon({ icon_name: iconName }), + reactive: true, + can_focus: true, + track_hover: true, + accessible_name: accessibleName, + x_expand: true, + x_align: Clutter.ActorAlign.CENTER, + style_class: 'system-menu-action', + }); } _createSubMenu() { diff --git a/js/ui/unlockDialog.js b/js/ui/unlockDialog.js index a584dce6df36c7938aaf11e4ebb25425c8d866fd..077ab1fbe2264d26727af946828e4807b352ef7f 100644 --- a/js/ui/unlockDialog.js +++ b/js/ui/unlockDialog.js @@ -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 { diff --git a/js/ui/viewSelector.js b/js/ui/viewSelector.js index 40396ab9c78690866d57e740ef87cb706ebc8b9d..6b10ec600c1542932a005eff08956f3a7a88c8db 100644 --- a/js/ui/viewSelector.js +++ b/js/ui/viewSelector.js @@ -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 diff --git a/src/st/st-bin.c b/src/st/st-bin.c index 6d6d056d2ec9f2580c676c5c4d49e8cf615c64c5..b9c17e59c75a5a52c6bfad32f8de941f534da800 100644 --- a/src/st/st-bin.c +++ b/src/st/st-bin.c @@ -43,9 +43,6 @@ struct _StBinPrivate { ClutterActor *child; - StAlign x_align; - StAlign y_align; - guint x_fill : 1; guint y_fill : 1; }; @@ -55,8 +52,6 @@ enum PROP_0, PROP_CHILD, - PROP_X_ALIGN, - PROP_Y_ALIGN, PROP_X_FILL, PROP_Y_FILL, @@ -97,6 +92,27 @@ clutter_container_iface_init (ClutterContainerIface *iface) iface->remove = st_bin_remove; } +static double +get_align_factor (ClutterActorAlign align) +{ + switch (align) + { + case CLUTTER_ACTOR_ALIGN_CENTER: + return 0.5; + + case CLUTTER_ACTOR_ALIGN_START: + return 0.0; + + case CLUTTER_ACTOR_ALIGN_END: + return 1.0; + + case CLUTTER_ACTOR_ALIGN_FILL: + break; + } + + return 0.0; +} + static void st_bin_allocate (ClutterActor *self, const ClutterActorBox *box, @@ -109,15 +125,16 @@ st_bin_allocate (ClutterActor *self, if (priv->child && clutter_actor_is_visible (priv->child)) { StThemeNode *theme_node = st_widget_get_theme_node (ST_WIDGET (self)); + ClutterActorAlign x_align = clutter_actor_get_x_align (priv->child); + ClutterActorAlign y_align = clutter_actor_get_y_align (priv->child); ClutterActorBox childbox; - gdouble x_align_f, y_align_f; st_theme_node_get_content_box (theme_node, box, &childbox); - st_get_align_factors (priv->x_align, priv->y_align, - &x_align_f, &y_align_f); clutter_actor_allocate_align_fill (priv->child, &childbox, - x_align_f, y_align_f, - priv->x_fill, priv->y_fill, + get_align_factor (x_align), + get_align_factor (y_align), + x_align == CLUTTER_ACTOR_ALIGN_FILL, + y_align == CLUTTER_ACTOR_ALIGN_FILL, flags); } } @@ -143,7 +160,10 @@ st_bin_get_preferred_width (ClutterActor *self, } else { - _st_actor_get_preferred_width (priv->child, for_height, priv->y_fill, + ClutterActorAlign y_align = clutter_actor_get_y_align (priv->child); + + _st_actor_get_preferred_width (priv->child, for_height, + y_align == CLUTTER_ACTOR_ALIGN_FILL, min_width_p, natural_width_p); } @@ -172,7 +192,10 @@ st_bin_get_preferred_height (ClutterActor *self, } else { - _st_actor_get_preferred_height (priv->child, for_width, priv->x_fill, + ClutterActorAlign x_align = clutter_actor_get_y_align (priv->child); + + _st_actor_get_preferred_height (priv->child, for_width, + x_align == CLUTTER_ACTOR_ALIGN_FILL, min_height_p, natural_height_p); } @@ -245,18 +268,6 @@ st_bin_set_property (GObject *gobject, st_bin_set_child (bin, g_value_get_object (value)); break; - case PROP_X_ALIGN: - st_bin_set_alignment (bin, - g_value_get_enum (value), - priv->y_align); - break; - - case PROP_Y_ALIGN: - st_bin_set_alignment (bin, - priv->x_align, - g_value_get_enum (value)); - break; - case PROP_X_FILL: st_bin_set_fill (bin, g_value_get_boolean (value), @@ -296,14 +307,6 @@ st_bin_get_property (GObject *gobject, g_value_set_boolean (value, priv->y_fill); break; - case PROP_X_ALIGN: - g_value_set_enum (value, priv->x_align); - break; - - case PROP_Y_ALIGN: - g_value_set_enum (value, priv->y_align); - break; - default: G_OBJECT_WARN_INVALID_PROPERTY_ID (gobject, prop_id, pspec); } @@ -339,32 +342,6 @@ st_bin_class_init (StBinClass *klass) CLUTTER_TYPE_ACTOR, ST_PARAM_READWRITE); - /** - * StBin:x-align: - * - * The horizontal alignment of the #StBin child. - */ - props[PROP_X_ALIGN] = - g_param_spec_enum ("x-align", - "X Align", - "The horizontal alignment", - ST_TYPE_ALIGN, - ST_ALIGN_MIDDLE, - ST_PARAM_READWRITE); - - /** - * StBin:y-align: - * - * The vertical alignment of the #StBin child. - */ - props[PROP_Y_ALIGN] = - g_param_spec_enum ("y-align", - "Y Align", - "The vertical alignment", - ST_TYPE_ALIGN, - ST_ALIGN_MIDDLE, - ST_PARAM_READWRITE); - /** * StBin:x-fill: * @@ -376,7 +353,7 @@ st_bin_class_init (StBinClass *klass) "Whether the child should fill the " "horizontal allocation", FALSE, - ST_PARAM_READWRITE); + ST_PARAM_READWRITE | G_PARAM_DEPRECATED); /** * StBin:y-fill: @@ -389,7 +366,7 @@ st_bin_class_init (StBinClass *klass) "Whether the child should fill the " "vertical allocation", FALSE, - ST_PARAM_READWRITE); + ST_PARAM_READWRITE | G_PARAM_DEPRECATED); g_object_class_install_properties (gobject_class, N_PROPS, props); } @@ -397,10 +374,6 @@ st_bin_class_init (StBinClass *klass) static void st_bin_init (StBin *bin) { - StBinPrivate *priv = st_bin_get_instance_private (bin); - - priv->x_align = ST_ALIGN_MIDDLE; - priv->y_align = ST_ALIGN_MIDDLE; } /** @@ -471,76 +444,6 @@ st_bin_get_child (StBin *bin) return ((StBinPrivate *)st_bin_get_instance_private (bin))->child; } -/** - * st_bin_set_alignment: - * @bin: a #StBin - * @x_align: horizontal alignment - * @y_align: vertical alignment - * - * Sets the horizontal and vertical alignment of the child - * inside a #StBin. - */ -void -st_bin_set_alignment (StBin *bin, - StAlign x_align, - StAlign y_align) -{ - StBinPrivate *priv; - gboolean changed = FALSE; - - g_return_if_fail (ST_IS_BIN (bin)); - - priv = st_bin_get_instance_private (bin); - - g_object_freeze_notify (G_OBJECT (bin)); - - if (priv->x_align != x_align) - { - priv->x_align = x_align; - g_object_notify_by_pspec (G_OBJECT (bin), props[PROP_X_ALIGN]); - changed = TRUE; - } - - if (priv->y_align != y_align) - { - priv->y_align = y_align; - g_object_notify_by_pspec (G_OBJECT (bin), props[PROP_Y_ALIGN]); - changed = TRUE; - } - - if (changed) - clutter_actor_queue_relayout (CLUTTER_ACTOR (bin)); - - g_object_thaw_notify (G_OBJECT (bin)); -} - -/** - * st_bin_get_alignment: - * @bin: a #StBin - * @x_align: return location for the horizontal alignment, or %NULL - * @y_align: return location for the vertical alignment, or %NULL - * - * Retrieves the horizontal and vertical alignment of the child - * inside a #StBin, as set by st_bin_set_alignment(). - */ -void -st_bin_get_alignment (StBin *bin, - StAlign *x_align, - StAlign *y_align) -{ - StBinPrivate *priv; - - g_return_if_fail (ST_IS_BIN (bin)); - - priv = st_bin_get_instance_private (bin); - - if (x_align) - *x_align = priv->x_align; - - if (y_align) - *y_align = priv->y_align; -} - /** * st_bin_set_fill: * @bin: a #StBin @@ -556,7 +459,6 @@ st_bin_set_fill (StBin *bin, gboolean y_fill) { StBinPrivate *priv; - gboolean changed = FALSE; g_return_if_fail (ST_IS_BIN (bin)); @@ -567,7 +469,6 @@ st_bin_set_fill (StBin *bin, if (priv->x_fill != x_fill) { priv->x_fill = x_fill; - changed = TRUE; g_object_notify_by_pspec (G_OBJECT (bin), props[PROP_X_FILL]); } @@ -575,14 +476,10 @@ st_bin_set_fill (StBin *bin, if (priv->y_fill != y_fill) { priv->y_fill = y_fill; - changed = TRUE; g_object_notify_by_pspec (G_OBJECT (bin), props[PROP_Y_FILL]); } - if (changed) - clutter_actor_queue_relayout (CLUTTER_ACTOR (bin)); - g_object_thaw_notify (G_OBJECT (bin)); } diff --git a/src/st/st-bin.h b/src/st/st-bin.h index 0a22ca0cd132431690464921963336e197065604..d4d9fa509ac71305fe6fccfb6c4847f7dd640ee9 100644 --- a/src/st/st-bin.h +++ b/src/st/st-bin.h @@ -47,12 +47,6 @@ StWidget * st_bin_new (void); void st_bin_set_child (StBin *bin, ClutterActor *child); ClutterActor *st_bin_get_child (StBin *bin); -void st_bin_set_alignment (StBin *bin, - StAlign x_align, - StAlign y_align); -void st_bin_get_alignment (StBin *bin, - StAlign *x_align, - StAlign *y_align); void st_bin_set_fill (StBin *bin, gboolean x_fill, gboolean y_fill); diff --git a/src/st/st-button.c b/src/st/st-button.c index 16984f2b334be444772be2f40cf06e71cce52659..c1ea7b99152e30b4dc194ff45c04fd2fc2feb993 100644 --- a/src/st/st-button.c +++ b/src/st/st-button.c @@ -628,6 +628,8 @@ st_button_set_label (StButton *button, "line-alignment", PANGO_ALIGN_CENTER, "ellipsize", PANGO_ELLIPSIZE_END, "use-markup", TRUE, + "x-align", CLUTTER_ACTOR_ALIGN_CENTER, + "y-align", CLUTTER_ACTOR_ALIGN_CENTER, NULL); st_bin_set_child (ST_BIN (button), label); } diff --git a/src/st/st-widget.c b/src/st/st-widget.c index f7e30849477d600f0f44bd252e846974c5f91bc9..586954b4687ded2e8a9e3de39bcc42324d78636d 100644 --- a/src/st/st-widget.c +++ b/src/st/st-widget.c @@ -3112,63 +3112,3 @@ st_widget_get_focus_chain (StWidget *widget) { return ST_WIDGET_GET_CLASS (widget)->get_focus_chain (widget); } - -/** - * st_get_align_factors: - * @x_align: an #StAlign - * @y_align: an #StAlign - * @x_align_out: (out) (optional): @x_align as a #gdouble - * @y_align_out: (out) (optional): @y_align as a #gdouble - * - * Converts @x_align and @y_align to #gdouble values. - */ -void -st_get_align_factors (StAlign x_align, - StAlign y_align, - gdouble *x_align_out, - gdouble *y_align_out) -{ - if (x_align_out) - { - switch (x_align) - { - case ST_ALIGN_START: - *x_align_out = 0.0; - break; - - case ST_ALIGN_MIDDLE: - *x_align_out = 0.5; - break; - - case ST_ALIGN_END: - *x_align_out = 1.0; - break; - - default: - g_warn_if_reached (); - break; - } - } - - if (y_align_out) - { - switch (y_align) - { - case ST_ALIGN_START: - *y_align_out = 0.0; - break; - - case ST_ALIGN_MIDDLE: - *y_align_out = 0.5; - break; - - case ST_ALIGN_END: - *y_align_out = 1.0; - break; - - default: - g_warn_if_reached (); - break; - } - } -} diff --git a/src/st/st-widget.h b/src/st/st-widget.h index d6e3ca2bf2cf495e59e32f1436509e5f6f875cbb..2f593e3d34c2a1523318fe94ff367b93208effe3 100644 --- a/src/st/st-widget.h +++ b/src/st/st-widget.h @@ -157,12 +157,6 @@ void st_widget_set_accessible_name (StWidget *widget, const gchar * st_widget_get_accessible_name (StWidget *widget); void st_widget_set_accessible (StWidget *widget, AtkObject *accessible); -/* utility methods */ -void st_get_align_factors (StAlign x_align, - StAlign y_align, - gdouble *x_align_out, - gdouble *y_align_out); - G_END_DECLS #endif /* __ST_WIDGET_H__ */