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

[BUG] icons get smaller after upgrading to 1.6.0 #1185

Closed
DimLight1998 opened this issue Sep 9, 2020 · 11 comments
Closed

[BUG] icons get smaller after upgrading to 1.6.0 #1185

DimLight1998 opened this issue Sep 9, 2020 · 11 comments
Labels

Comments

@DimLight1998
Copy link

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

@DaveDavenport
Copy link
Collaborator

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.

@TheBabu
Copy link

TheBabu commented Sep 14, 2020

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

@DaveDavenport
Copy link
Collaborator

DaveDavenport commented Sep 14, 2020

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).

@TheBabu
Copy link

TheBabu commented Sep 14, 2020

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?

@DaveDavenport
Copy link
Collaborator

DaveDavenport commented Sep 14, 2020

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.

@Brottweiler
Copy link

@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.

@DaveDavenport
Copy link
Collaborator

DaveDavenport commented Sep 15, 2020

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.

@Brottweiler
Copy link

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!

@DaveDavenport
Copy link
Collaborator

DaveDavenport commented Sep 15, 2020

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

@Brottweiler
Copy link

Works perfectly! thank you very much.

tricktux added a commit to tricktux/dotfiles that referenced this issue Oct 17, 2020
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants