berk-karaal / cinnamon-horizontal-osd

Cinnamon OSD extension for horizontal and customizable OSDs
GNU General Public License v3.0
22 stars 2 forks source link

Level bar appears too low when using fractional scaling #3

Open Stonley890 opened 1 year ago

Stonley890 commented 1 year ago

I have two monitors, one 1080p and the other 1440p. I have fractional scaling enabled with the 1440p display at 125% scale. On both displays, the OSD level bar is too low. Screenshot from 2023-07-24 13-49-29

Here is my config:

{
    "layout": {
        "type": "layout",
        "pages": [
            "general",
            "colors",
            "advanced",
            "select-horizontal-osds"
        ],
        "general": {
            "type": "page",
            "title": "General",
            "sections": [
                "general-osd-configs",
                "general-icon-configs",
                "general-level-bar-configs",
                "general-label-configs"
            ]
        },
        "general-osd-configs": {
            "type": "section",
            "title": "Osd Window",
            "keys": [
                "osd-width",
                "osd-height",
                "osd-border-radius",
                "osd-position-x",
                "osd-position-y",
                "osd-hide-timeout"
            ]
        },
        "general-icon-configs": {
            "type": "section",
            "title": "Icon",
            "keys": [
                "icon-size"
            ]
        },
        "general-level-bar-configs": {
            "type": "section",
            "title": "Level Bar",
            "keys": [
                "level-bar-size",
                "level-bar-border-radius"
            ]
        },
        "general-label-configs": {
            "type": "section",
            "title": "Label",
            "keys": [
                "label-show",
                "label-size",
                "label-vertical-align-correction"
            ]
        },
        "colors": {
            "type": "page",
            "title": "Colors",
            "sections": [
                "osd-window-colors",
                "icon-colors",
                "level-bar-colors",
                "label-colors"
            ]
        },
        "osd-window-colors": {
            "type": "section",
            "title": "Osd Window",
            "keys": [
                "osd-window-overwrite-colors",
                "osd-window-border-color",
                "osd-window-background-color"
            ]
        },
        "icon-colors": {
            "type": "section",
            "title": "Icon",
            "keys": [
                "icon-overwrite-colors",
                "icon-color"
            ]
        },
        "level-bar-colors": {
            "type": "section",
            "title": "Level Bar",
            "keys": [
                "level-bar-overwrite-colors",
                "level-bar-foreground-color",
                "level-bar-background-color"
            ]
        },
        "label-colors": {
            "type": "section",
            "title": "Label",
            "keys": [
                "label-overwrite-colors",
                "label-color"
            ]
        },
        "advanced": {
            "type": "page",
            "title": "Advanced",
            "sections": [
                "advanced-osd-window-configs",
                "advanced-icon-configs",
                "advanced-level-bar-configs",
                "advanced-label-configs"
            ]
        },
        "advanced-osd-window-configs": {
            "type": "section",
            "title": "Osd Window",
            "keys": [
                "osd-window-overwrite-css",
                "osd-window-css"
            ]
        },
        "advanced-icon-configs": {
            "type": "section",
            "title": "Icon",
            "keys": [
                "icon-overwrite-css",
                "icon-css"
            ]
        },
        "advanced-level-bar-configs": {
            "type": "section",
            "title": "Level Bar",
            "keys": [
                "level-bar-overwrite-css",
                "level-bar-background-css",
                "level-bar-foreground-css"
            ]
        },
        "advanced-label-configs": {
            "type": "section",
            "title": "Label",
            "keys": [
                "label-overwrite-css",
                "label-css"
            ]
        },
        "select-horizontal-osds": {
            "type": "page",
            "title": "Select OSDs",
            "sections": [
                "select-horizontal-osds-section"
            ]
        },
        "select-horizontal-osds-section": {
            "type": "section",
            "title": "Select OSDs",
            "keys": [
                "select-osds-info-text",
                "selected-volume-as-horizontal",
                "selected-brightness-as-horizontal",
                "selected-mic-as-horizontal"
            ]
        }
    },
    "osd-width": {
        "type": "entry",
        "default": "2",
        "description": "Width of OSD window",
        "tooltip": "osd_width = this._popupSize * <this value>",
        "value": "2"
    },
    "osd-height": {
        "type": "entry",
        "default": "0.3",
        "description": "Height of OSD window",
        "tooltip": "osd_height = this._popupSize * <this value>",
        "value": "0.25"
    },
    "osd-border-radius": {
        "type": "entry",
        "default": "999",
        "description": "Border radius od OSD window (in pixels)",
        "tooltip": "border-radius: <this value>px;",
        "value": "10"
    },
    "osd-position-x": {
        "type": "spinbutton",
        "default": 50,
        "min": 0,
        "max": 100,
        "step": 1,
        "description": "X position of OSD window relative to screen size by percentage",
        "tooltip": "0 is left, 100 is right",
        "value": 15.0
    },
    "osd-position-y": {
        "type": "spinbutton",
        "default": 90,
        "min": 0,
        "max": 100,
        "step": 1,
        "description": "Y position of OSD window relative to screen size by percentage",
        "tooltip": "0 is top, 100 is bottom",
        "value": 95.0
    },
    "osd-hide-timeout": {
        "type": "entry",
        "default": "1500",
        "description": "Hide timeout of OSD window (in milliseconds)",
        "value": "1500"
    },
    "icon-size": {
        "type": "spinbutton",
        "default": 50,
        "min": 0,
        "max": 100,
        "step": 1,
        "description": "Size of icon relative to OSD height by percentage",
        "tooltip": "icon_size = osd_height * (<this value> / 100)",
        "value": 25.0
    },
    "level-bar-size": {
        "type": "spinbutton",
        "default": 50,
        "min": 0,
        "max": 100,
        "step": 1,
        "description": "Size of level bar relative to OSD height by percentage",
        "tooltip": "level_bar_size = osd_height * (<this value> / 100)",
        "value": 25.0
    },
    "level-bar-border-radius": {
        "type": "entry",
        "default": "2",
        "description": "Border radius of level bar (in pixels)",
        "tooltip": "border-radius: <this value>px;",
        "value": "3"
    },
    "label-show": {
        "type": "checkbox",
        "default": true,
        "description": "Show label",
        "value": true
    },
    "label-size": {
        "type": "spinbutton",
        "dependency": "label-show",
        "default": 35,
        "min": 0,
        "max": 100,
        "step": 1,
        "description": "Size of label relative to OSD height by percentage",
        "tooltip": "label_size = osd_height * (<this value> / 100)",
        "value": 20.0
    },
    "label-vertical-align-correction": {
        "type": "entry",
        "dependency": "label-show",
        "default": "-4",
        "description": "Label can not be centered correctly for now. You can adjust or decrease top margin of label here. (value: positive or negative int)",
        "tooltip": "margin-top: (calculated_value + <this value>)px",
        "value": "-4"
    },
    "osd-window-overwrite-colors": {
        "type": "checkbox",
        "default": false,
        "description": "Overwrite OSD window colors",
        "value": true
    },
    "osd-window-border-color": {
        "type": "colorchooser",
        "dependency": "osd-window-overwrite-colors",
        "default": "rgba(32, 74, 135, 1)",
        "description": "Border color of OSD window",
        "value": "rgb(43,43,43)"
    },
    "osd-window-background-color": {
        "type": "colorchooser",
        "dependency": "osd-window-overwrite-colors",
        "default": "rgba(40, 53, 92, 0.75)",
        "description": "Background color of OSD window",
        "value": "rgba(0,0,0,0.729537)"
    },
    "icon-overwrite-colors": {
        "type": "checkbox",
        "default": false,
        "description": "Overwrite icon color",
        "value": false
    },
    "icon-color": {
        "type": "colorchooser",
        "dependency": "icon-overwrite-colors",
        "default": "rgba(114, 159, 207, 1)",
        "description": "Icon color",
        "value": "rgba(114, 159, 207, 1)"
    },
    "level-bar-overwrite-colors": {
        "type": "checkbox",
        "default": false,
        "description": "Overwrite level bar colors",
        "value": true
    },
    "level-bar-foreground-color": {
        "type": "colorchooser",
        "dependency": "level-bar-overwrite-colors",
        "default": "rgba(114, 159, 207, 1)",
        "description": "Level bar foreground color",
        "value": "rgb(252,112,56)"
    },
    "level-bar-background-color": {
        "type": "colorchooser",
        "dependency": "level-bar-overwrite-colors",
        "default": "rgba(32, 74, 135, 1)",
        "description": "Level bar background color",
        "value": "rgb(43,43,43)"
    },
    "label-overwrite-colors": {
        "type": "checkbox",
        "default": false,
        "description": "Overwrite label color",
        "value": false
    },
    "label-color": {
        "type": "colorchooser",
        "dependency": "label-overwrite-colors",
        "default": "rgba(142, 175, 210, 1)",
        "description": "Label color",
        "value": "rgba(142, 175, 210, 1)"
    },
    "osd-window-overwrite-css": {
        "type": "checkbox",
        "default": false,
        "description": "Overwrite CSS of OSD window",
        "value": false
    },
    "osd-window-css": {
        "type": "entry",
        "dependency": "osd-window-overwrite-css",
        "default": "border-radius: 99px;",
        "description": "CSS of OSD window",
        "value": "border-radius: 99px;"
    },
    "icon-overwrite-css": {
        "type": "checkbox",
        "default": false,
        "description": "Overwrite CSS of icon",
        "value": false
    },
    "icon-css": {
        "type": "entry",
        "dependency": "icon-overwrite-css",
        "default": "margin: 0; margin-left: 10px; padding: 0;",
        "description": "CSS of icon",
        "value": "margin: 0; margin-left: 10px; padding: 0;"
    },
    "level-bar-overwrite-css": {
        "type": "checkbox",
        "default": false,
        "description": "Overwrite CSS of level bar",
        "value": false
    },
    "level-bar-background-css": {
        "type": "entry",
        "dependency": "level-bar-overwrite-css",
        "default": "margin: 0; padding: 0;",
        "description": "CSS of level bar",
        "value": ""
    },
    "level-bar-foreground-css": {
        "type": "entry",
        "dependency": "level-bar-overwrite-css",
        "default": "border-radius: 0px;",
        "description": "CSS for foregorund of level bar",
        "value": "border-radius: 0px;"
    },
    "label-overwrite-css": {
        "type": "checkbox",
        "default": false,
        "description": "Overwrite CSS of label",
        "value": false
    },
    "label-css": {
        "type": "entry",
        "dependency": "label-overwrite-css",
        "default": "text-align: left; font-size: 1.2em; margin: 10px 0 0 0; min-width: 80px; padding: 0;",
        "description": "CSS of label",
        "value": "text-align: left; font-size: 1.2em; margin: 10px 0 0 0; min-width: 80px; padding: 0;"
    },
    "select-osds-info-text": {
        "type": "label",
        "description": "You can choose which OSDs to be horizontal here"
    },
    "selected-volume-as-horizontal": {
        "type": "checkbox",
        "default": true,
        "description": "Volume OSD",
        "value": true
    },
    "selected-brightness-as-horizontal": {
        "type": "checkbox",
        "default": true,
        "description": "Brightness OSD",
        "value": true
    },
    "selected-mic-as-horizontal": {
        "type": "checkbox",
        "default": true,
        "description": "Microphone OSD",
        "value": true
    },
    "__md5__": "f4e32d6f913398d87aae079cd3234855"
}
Yjtdontcode commented 6 months ago

I have the same problem

ProDJ77 commented 3 months ago

Same issue here with a 2160p display at 150% scale on Linux Mint 22.

edofe99 commented 1 month ago

Same problem here...