Scale appIcon text according to accessibility factor

This commit is contained in:
Charles Gagnon
2020-06-25 07:46:21 -04:00
parent f30ad4dae9
commit a076d8ffc8
2 changed files with 4 additions and 2 deletions

View File

@@ -484,6 +484,7 @@ var taskbarAppIcon = Utils.defineClass({
let useFixedWidth = Me.settings.get_boolean('group-apps-use-fixed-width');
let variableWidth = !useFixedWidth || Panel.checkIfVertical() || this.dtpPanel.taskbar.fullScrollView;
let fontWeight = Me.settings.get_string('group-apps-label-font-weight');
let fontScale = Me.desktopSettings.get_double('text-scaling-factor');
let fontColor = this.window.minimized ?
Me.settings.get_string('group-apps-label-font-color-minimized') :
Me.settings.get_string('group-apps-label-font-color');
@@ -496,7 +497,7 @@ var taskbarAppIcon = Utils.defineClass({
this._windowTitle.clutter_text.natural_width_set = useFixedWidth;
this._windowTitle.set_width(variableWidth ? -1 : maxLabelWidth + TITLE_RIGHT_PADDING * scaleFactor);
this._windowTitle.set_style('font-size: ' + Me.settings.get_int('group-apps-label-font-size') + 'px;' +
this._windowTitle.set_style('font-size: ' + Me.settings.get_int('group-apps-label-font-size') * fontScale + 'px;' +
'font-weight: ' + fontWeight + ';' +
(useFixedWidth ? '' : 'max-width: ' + maxLabelWidth + 'px;') +
'color: ' + fontColor);

View File

@@ -953,8 +953,9 @@ var Preview = Utils.defineClass({
let icon = this._previewMenu.getCurrentAppIcon().app.create_icon_texture(iconTextureSize);
let workspaceIndex = '';
let workspaceStyle = null;
let fontScale = Me.desktopSettings.get_double('text-scaling-factor');
let commonTitleStyles = 'color: ' + Me.settings.get_string('window-preview-title-font-color') + ';' +
'font-size: ' + Me.settings.get_int('window-preview-title-font-size') + 'px;' +
'font-size: ' + Me.settings.get_int('window-preview-title-font-size') * fontScale + 'px;' +
'font-weight: ' + Me.settings.get_string('window-preview-title-font-weight') + ';';
this._iconBin.destroy_all_children();