style: Improve text scaling support
- new drawing function to convert px to em, for select instances - updated fontsize function to convert fonts in pt to em - replace instances of discrete sizes with defined values - fix instances where assets or icons did not scale along with text - rework panel buttons to accommodate the scaling padding and icons - new 'scalable' definitions for elements that follow text scaling Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3033>
This commit is contained in:
@@ -2607,7 +2607,7 @@ export const AppFolderDialog = GObject.registerClass({
|
||||
|
||||
// Edit button
|
||||
this._editButton = new St.Button({
|
||||
style_class: 'edit-folder-button',
|
||||
style_class: 'icon-button',
|
||||
button_mask: St.ButtonMask.ONE,
|
||||
toggle_mode: true,
|
||||
reactive: true,
|
||||
|
@@ -729,7 +729,7 @@ const MessagesIndicator = GObject.registerClass(
|
||||
class MessagesIndicator extends St.Icon {
|
||||
_init() {
|
||||
super._init({
|
||||
icon_size: 16,
|
||||
style_class: 'messages-indicator',
|
||||
visible: false,
|
||||
y_expand: true,
|
||||
y_align: Clutter.ActorAlign.CENTER,
|
||||
|
@@ -358,16 +358,20 @@ export const Message = GObject.registerClass({
|
||||
this._mediaControls = new St.BoxLayout();
|
||||
hbox.add_child(this._mediaControls);
|
||||
|
||||
let titleBox = new St.BoxLayout();
|
||||
let titleBox = new St.BoxLayout({style_class: 'message-title-box'});
|
||||
contentBox.add_child(titleBox);
|
||||
|
||||
this.titleLabel = new St.Label({style_class: 'message-title'});
|
||||
this.titleLabel = new St.Label({
|
||||
style_class: 'message-title',
|
||||
y_align: Clutter.ActorAlign.END,
|
||||
});
|
||||
this.setTitle(title);
|
||||
titleBox.add_child(this.titleLabel);
|
||||
|
||||
this._secondaryBin = new St.Bin({
|
||||
style_class: 'message-secondary-bin',
|
||||
x_expand: true, y_expand: true,
|
||||
y_align: Clutter.ActorAlign.END,
|
||||
});
|
||||
titleBox.add_child(this._secondaryBin);
|
||||
|
||||
|
Reference in New Issue
Block a user