gxkb icon indicating copy to clipboard operation
gxkb copied to clipboard

Text instead of flags

Open nazar-pc opened this issue 7 years ago β€’ 6 comments

Would it be difficult to add an option to show text like US instead of flags? It would fit monochrome themes much better.

nazar-pc avatar Jan 21 '18 21:01 nazar-pc

Hi!

I had the similar discussion in the ticket #3.

In general, it's not so hard to draw text on the fly. But there are some expected issues:

  • Hard to guess the proper front/background colors by default.
  • Absent specific font on some systems.
  • The fonts smoothing.

Instead of that, I propose to use a shell script to generate images with text labels and keep gxkb as simple as possible.

zen-tools avatar Jan 22 '18 10:01 zen-tools

I've tried to use GIMP for creating images, but text was blurry and very far from what proper text looks like. Will try gen-labels now.

nazar-pc avatar Jan 22 '18 12:01 nazar-pc

By the way, gxkb uses images with 24x24 pixels size. If your panel uses less value for systray icons size, you can get blurry text due to the image resize.

zen-tools avatar Jan 22 '18 13:01 zen-tools

Yes, my panel is 24px and icons are 22px. I've tried making 22px images, but it doesn't work. Tried gen-labels with my own font (customized it a bit) too, still blurry either way.

Ideally background, font and color should be configurable and directly rendered as text.

nazar-pc avatar Jan 22 '18 14:01 nazar-pc

It doesn't work because gxkb had hardcoded values for icon size :).

So, there are two options:

  • Change panel size to 26px and icons to 24px. or
  • Try to build gxkb from master branch. I think the commit 710b95c should help.

If you are using Ubuntu-like distributive, you can install the latest version of gxkb from ppa.

zen-tools avatar Jan 22 '18 15:01 zen-tools

Master branch is much better, 22x22px icon is rendered as intended, thanks for that! I can't reach the same rendering quality as with text using neither gen-labels nor GIMP, but it works reasonably well as a workaround.

nazar-pc avatar Jan 22 '18 21:01 nazar-pc