mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-14 00:04:17 +09:00
Scale appIcon text according to accessibility factor
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user