mirror of
https://github.com/morgan9e/dash-to-panel
synced 2026-04-15 00:34:05 +09:00
unscale css sizes for hidpi
This commit is contained in:
15
taskbar.js
15
taskbar.js
@@ -1395,11 +1395,11 @@ const taskbarAppIcon = new Lang.Class({
|
||||
let inlineStyle = 'margin: 0 ' + margin + 'px;';
|
||||
|
||||
if(this._dtpSettings.get_boolean('focus-highlight') && tracker.focus_app == this.app && !this._isThemeProvidingIndicator()) {
|
||||
let containerWidth = this._iconContainer.get_width();
|
||||
let containerWidth = this._iconContainer.get_width() / St.ThemeContext.get_for_stage(global.stage).scale_factor;
|
||||
let focusedDotStyle = this._dtpSettings.get_string('dot-style-focused');
|
||||
let isWide = this._isWideDotStyle(focusedDotStyle);
|
||||
let pos = this._dtpSettings.get_string('dot-position');
|
||||
let size = this._getScaledDotSize();
|
||||
let size = this._dtpSettings.get_int('dot-size');
|
||||
|
||||
inlineStyle += "background-image: url('" +
|
||||
Me.path + "/img/highlight_" +
|
||||
@@ -1682,7 +1682,7 @@ const taskbarAppIcon = new Lang.Class({
|
||||
let [width, height] = area.get_surface_size();
|
||||
let cr = area.get_context();
|
||||
let n = this._nWindows;
|
||||
let size = this._getScaledDotSize();
|
||||
let size = this._dtpSettings.get_int('dot-size') * St.ThemeContext.get_for_stage(global.stage).scale_factor;
|
||||
let padding = 0; // distance from the margin
|
||||
let yOffset = this._dtpSettings.get_string('dot-position') == DOT_POSITION.TOP ? 0 : (height - padding - size);
|
||||
|
||||
@@ -1788,15 +1788,6 @@ const taskbarAppIcon = new Lang.Class({
|
||||
cr.$dispose();
|
||||
},
|
||||
|
||||
_getScaledDotSize: function() {
|
||||
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
|
||||
let size = this._dtpSettings.get_int('dot-size');
|
||||
if(scaleFactor)
|
||||
size = size*scaleFactor;
|
||||
|
||||
return size;
|
||||
},
|
||||
|
||||
_numberOverlay: function() {
|
||||
// Add label for a Hot-Key visual aid
|
||||
this._numberOverlayLabel = new St.Label();
|
||||
|
||||
Reference in New Issue
Block a user