Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSD customizations #879

Closed
1qh opened this issue Apr 14, 2023 · 4 comments
Closed

OSD customizations #879

1qh opened this issue Apr 14, 2023 · 4 comments
Labels
enhancement New feature or request later Not priority at the moment

Comments

@1qh
Copy link

1qh commented Apr 14, 2023

image

It would be awesome if we can have following configurations for the OSD:

  • item height, width
  • item vertical padding
  • focus item border width
  • focus item background and text color
  • possible to hide each of 3 columns
  • position of desktop name (top/bottom)
  • different font size for desktop switcher and window switcher
  • size of the squares in desktop switcher

Thanks a lot. Looking forward for you to add these features.

@m1027
Copy link

m1027 commented Apr 15, 2023

Same here, I recently tried a large font size but the line height does not scale, so the displayed lines start to overlap.
<font place="OnScreenDisplay"> <name>DejaVu Sans Mono</name> <size>30</size><weight>normal</weight><slant>normal</slant> </font>

@Consolatis
Copy link
Member

Consolatis commented Apr 15, 2023

Hm.. right. Although we actually calculate the line height of the configured font, we only subtract it from a hardcoded item height (20px) to center the line. So if the line height based on the font config is > 20px, stuff starts to get wrong. We should likely replace that logic with some theme setting like osd.item.padding.y and remove the height of the item completely so its always calculated like osd.item.padding.y * 2 + font_height(font_osd).

In the meantime, if you feel like modifying the code itself to make your local copy work for bigger font sizes, src/osd.c right at the top: OSD_ITEM_HEIGHT.

@Consolatis Consolatis added enhancement New feature or request later Not priority at the moment labels Apr 15, 2023
@m1027
Copy link

m1027 commented Apr 17, 2023

Hm.. right. Although we actually calculate the line height of the configured font, we only subtract it from a hardcoded item height (20px) to center the line.

Thanks for sharing the insights.

So, I believe, this whole thing is actually 2 things:

  • A fix to handle the line height correctly (without the need to configure anything).
  • An enhancement (see OP).

johanmalm added a commit to johanmalm/labwc that referenced this issue Apr 19, 2023
<windowSwitcher>
  <fields>
    <field content="type" width="25%" />
    <field content="app_id" width="25%" />
    <field content="title" width="50%" />
  </fields>
</windowSwitcher>

Relates to issueis labwc#852 labwc#855 labwc#879
johanmalm added a commit to johanmalm/labwc that referenced this issue Apr 21, 2023
<windowSwitcher>
  <fields>
    <field content="type" width="25%" />
    <field content="app_id" width="25%" />
    <field content="title" width="50%" />
  </fields>
</windowSwitcher>

Relates to issues labwc#852 labwc#855 labwc#879
johanmalm added a commit that referenced this issue Apr 21, 2023
<windowSwitcher>
  <fields>
    <field content="type" width="25%" />
    <field content="app_id" width="25%" />
    <field content="title" width="50%" />
  </fields>
</windowSwitcher>

Relates to issues #852 #855 #879
johanmalm added a commit to johanmalm/labwc that referenced this issue Apr 24, 2023
Add theme options
  - osd.window-switcher.item.width
  - osd.window-switcher.item.padding.x
  - osd.window-switcher.item.padding.y

Calculate window switcher item-height using font-height() + 2 * padding.y

Issue labwc#879
@johanmalm johanmalm mentioned this issue Apr 24, 2023
6 tasks
johanmalm added a commit to johanmalm/labwc that referenced this issue Apr 24, 2023
Add theme options
  - osd.window-switcher.item.width
  - osd.window-switcher.item.padding.x
  - osd.window-switcher.item.padding.y

Calculate window switcher item-height using font-height() + 2 * padding.y

Issue labwc#879
johanmalm added a commit to johanmalm/labwc that referenced this issue Jun 29, 2023
...and calculate item-height based on font-height

Add theme options
  - osd.window-switcher.width
  - osd.window-switcher.item.padding.x
  - osd.window-switcher.item.padding.y

Issue labwc#879
johanmalm added a commit to johanmalm/labwc that referenced this issue Jun 29, 2023
...and calculate item-height based on font-height

Add theme options
  - osd.window-switcher.width
  - osd.window-switcher.item.padding.x
  - osd.window-switcher.item.padding.y

Issue labwc#879
@johanmalm johanmalm mentioned this issue Jun 29, 2023
17 tasks
johanmalm added a commit that referenced this issue Jun 29, 2023
...and calculate item-height based on font-height

Add theme options
  - osd.window-switcher.width
  - osd.window-switcher.item.padding.x
  - osd.window-switcher.item.padding.y

Issue #879
@johanmalm
Copy link
Collaborator

Will track this in #968
Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request later Not priority at the moment
Projects
None yet
Development

No branches or pull requests

4 participants