Skip to content

Commit

Permalink
MessageTray: Adapt to UI changes in Gnome46
Browse files Browse the repository at this point in the history
  • Loading branch information
maniacx committed Mar 2, 2024
1 parent 8886ac5 commit 4c1ab27
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lib/airpodTrayIndicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,15 +155,16 @@ class AirpodMessage extends MessageList.Message {
this._mediaControls.get_parent().get_children()[1].hide();
this._mediaControls.x_expand = true;

const box = new St.BoxLayout({style_class: 'abm-message-box', x_expand: true, y_expand: true});
const boxStyle = shellVersion45 ? 'abm-message-45-box' : 'abm-message-box';
const box = new St.BoxLayout({style_class: boxStyle, x_expand: true, y_expand: true});
this._mediaControls.add_child(box);
const deviceInfoBox = new St.BoxLayout({vertical: true, x_expand: true});
const timeDetailsBox = new St.BoxLayout({vertical: true, y_expand: true});
box.add_child(deviceInfoBox);
box.add_child(timeDetailsBox);

const topBox = new St.BoxLayout({y_align: Clutter.ActorAlign.START, x_expand: true, y_expand: true});
const bottomBox = new St.BoxLayout({y_align: Clutter.ActorAlign.END, x_expand: true, y_expand: false});
const bottomBox = new St.BoxLayout({y_align: Clutter.ActorAlign.END, x_expand: true, y_expand: true});
deviceInfoBox.add_child(topBox);
deviceInfoBox.add_child(bottomBox);

Expand Down
10 changes: 9 additions & 1 deletion stylesheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,20 @@
font-size: 0.75em;
}
.abm-message-box:ltr {
padding-left: 8px;
padding-right: 18px;
}
.abm-message-box:rtl {
padding-left: 18px;
padding-right: 8px;
}
.abm-message-45-box:ltr {
padding-top: 18px;
padding-bottom: 18px;
padding-left: 8px;
padding-right: 18px;
}
.abm-message-box:rtl {
.abm-message-45-box:rtl {
padding-top: 18px;
padding-bottom: 18px;
padding-left: 18px;
Expand Down

0 comments on commit 4c1ab27

Please sign in to comment.