padOsd: shuffle title labels hierarchy

Add some boxes in between, so we can add the pad chooser button
and the overall result is still centered.

https://bugzilla.gnome.org/show_bug.cgi?id=779986
This commit is contained in:
Carlos Garnacho 2017-02-13 15:11:22 +01:00
parent ada21c975f
commit e0c0d9223e
4 changed files with 21 additions and 3 deletions

View File

@ -566,6 +566,10 @@ StScrollBar {
.pad-osd-window { .pad-osd-window {
padding: 32px; padding: 32px;
background-color: rgba(0, 0, 0, 0.8); } background-color: rgba(0, 0, 0, 0.8); }
.pad-osd-window .pad-osd-title-box {
spacing: 12px; }
.pad-osd-window .pad-osd-title-menu-box {
spacing: 6px; }
.combo-box-label { .combo-box-label {
width: 15em; } width: 15em; }

@ -1 +1 @@
Subproject commit 671023a8b333f027d8c88fca9963b11581c10a70 Subproject commit c2e4db4980c4f99a237d20186dcd7f265a83cb6b

View File

@ -566,6 +566,10 @@ StScrollBar {
.pad-osd-window { .pad-osd-window {
padding: 32px; padding: 32px;
background-color: rgba(0, 0, 0, 0.8); } background-color: rgba(0, 0, 0, 0.8); }
.pad-osd-window .pad-osd-title-box {
spacing: 12px; }
.pad-osd-window .pad-osd-title-menu-box {
spacing: 6px; }
.combo-box-label { .combo-box-label {
width: 15em; } width: 15em; }

View File

@ -560,13 +560,23 @@ const PadOsd = new Lang.Class({
let constraint = new Layout.MonitorConstraint({ index: monitorIndex }); let constraint = new Layout.MonitorConstraint({ index: monitorIndex });
this.actor.add_constraint(constraint); this.actor.add_constraint(constraint);
this._titleBox = new St.BoxLayout({ style_class: 'pad-osd-title-box',
vertical: false,
x_expand: false,
x_align: Clutter.ActorAlign.CENTER });
this.actor.add_actor(this._titleBox);
let labelBox = new St.BoxLayout({ style_class: 'pad-osd-title-menu-box',
vertical: true });
this._titleBox.add_actor(labelBox);
this._titleLabel = new St.Label({ style: 'font-side: larger; font-weight: bold;', this._titleLabel = new St.Label({ style: 'font-side: larger; font-weight: bold;',
x_align: Clutter.ActorAlign.CENTER }); x_align: Clutter.ActorAlign.CENTER });
this._titleLabel.clutter_text.set_text(padDevice.get_device_name()); this._titleLabel.clutter_text.set_text(padDevice.get_device_name());
this.actor.add_actor(this._titleLabel); labelBox.add_actor(this._titleLabel);
this._tipLabel = new St.Label({ x_align: Clutter.ActorAlign.CENTER }); this._tipLabel = new St.Label({ x_align: Clutter.ActorAlign.CENTER });
this.actor.add_actor(this._tipLabel); labelBox.add_actor(this._tipLabel);
this._actionEditor = new ActionEditor(); this._actionEditor = new ActionEditor();
this._actionEditor.connect('done', Lang.bind(this, this._endButtonActionEdition)); this._actionEditor.connect('done', Lang.bind(this, this._endButtonActionEdition));