Rofi: [BUG] icons get smaller after upgrading to 1.6.0

Created on 9 Sep 2020  路  11Comments  路  Source: davatorium/rofi

Version

$ rofi -v
Version: 1.6.0

Configuration

https://gist.github.com/DimLight1998/dee32e016ac2ef0cc0bf2e889bcb47d1

(I have Xft.dpi: 96 in my ~/.Xresources but I don't know if it is related to the bug.)

Launch Command

  • rofi -show drun
  • rofi -show combi -combi-modi drun#run
  • rofi -show window

Steps to reproduce

  1. upgrade to 1.6.0 (I'm using archlinux)
  2. execute rofi -show drun from a terminal
  3. get small icons which are hard to identify

What behaviour you see

(screenshot of 1.6.0)

new-crop

What behaviour you expect to see

(screenshot of 1.5.4)

old-crop

bug

Most helpful comment

Not a bug, but caused by change in release (see release notes). Default theme fixes this, your theme does not have this fix.
(If you load your theme on top of default theme, you should get this automatically).

element-icon {
    size:             1.2ch ;
}

icon is separate widget now, so more theming options are possible.

All 11 comments

Not a bug, but caused by change in release (see release notes). Default theme fixes this, your theme does not have this fix.
(If you load your theme on top of default theme, you should get this automatically).

element-icon {
    size:             1.2ch ;
}

icon is separate widget now, so more theming options are possible.

I actually have tried this fix, it does not work for some sort of reason?

* {
  background-color: #282828;
  border-color: #333;
  text-color: #d0d0d0;
  border-color: #333;
  spacing: 0;
}

window {
  border: 1;
  padding: 3;
}

inputbar {
  border: 0 0 1px 0;
  children: [prompt,entry];
  padding: 3;
}

prompt {
  padding: 8px;
  border: 0 1px 0 0;
}

#textbox {
  text-color: #d0d0d0;
}

entry {
  padding: 8px;
}

listview {
  cycle: false;
  margin: 0 0 -1px 0;
  scrollbar: false;
}

element {
  border: 0 0 1px 0;
  padding: 5px;
}

element selected {
  background-color: #333;
}

element-icon {
    size: 1.2ch;
}


This is my theme

increase the size until it is the size you want? probably 1.2 em will do what you want (1.2 times estimated font size).

Thank you, so 1.2em will go back to the original size? Cuz I really liked that size

EDIT:
1.2em was really big
I tried guessing and checking with a screenshot I had a from time ago and 2.4ch is the closest I got, can someone verify what will get back to the original size?

original size should be +- 1.0 em.. 1.0ch should about same as the width of a character.

There was an issue that some versions on pango reported the font slightly lower then it was after rendering, so that might sideways affect things too.

@DaveDavenport with all due respect, I use the default theme and my icons are small. I don't understand, is the only solution to this to make a new theme with only icon size changes?

You do say default theme fixes this, but for me icons are still very small with the default config and theme.

no you don't need a new theme.. you can add this single modification to your configuration file.

If not set, the size of the icon is set to 16 pixels. .. The default theme changes is to 1.2 times the width of a character (according to what pango reports). This worked well for me in the past to make it nicely fit with the text.

I now changed the default theme in git to use the (measured) font height instead of width, in hope to better emulate the old behavior for other people.

I never had the very small icons myself, while developing, I think this is because of the type of font I use by default. On top of this, none of the beta testers in the past almost year complained about this, so this one fell through the cracks.
I am not sure what you expect me to do ? I cannot travel back in time and change the release.

Thank you for the response!

I am not looking for you to change anything, I am just trying to understand how, in the 1.6.0 version of rofi, how to change the icon size without a theme. I only wanted to know, because I did not understand. I wish you the best and thanks for the new release!

add the above section to the end of your config.rasi file, and it should be applied on top of the set theme, if no theme set it is applied on top of the default one.

element-icon {
    size:             1.0em ;
}

or you can pass it on commandline (easy to testing changes): rofi -theme-str 'element-icon { size: 1.0em;}' -show drun

Works perfectly! thank you very much.

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ghost picture ghost  路  3Comments

DragonAxe picture DragonAxe  路  3Comments

benjumanji picture benjumanji  路  5Comments

strogiyotec picture strogiyotec  路  4Comments

pigmonkey picture pigmonkey  路  5Comments