davatorium / rofi

Rofi: A window switcher, application launcher and dmenu replacement
https://davatorium.github.io/rofi/
Other
13.04k stars 609 forks source link

[BUG] Width not respected in horizontal view #1137

Closed colbyaustinbrown closed 4 years ago

colbyaustinbrown commented 4 years ago

Version

Version: 1.5.4-126-git-db308d2e (next)

Configuration

https://gist.github.com/colbyaustinbrown/151c955823a621b06c5e69997b00f23b

Launch Command

echo "One\nTwo\nThree" | rofi -dmenu -theme ~/rofi/theme.rasi

Steps to reproduce

element {

width: 100px; background-color: #666666; }


- Run rofi with the command given above

## What behaviour you see

- Elements are very small, with all text truncated to "..."

## What behaviour you expect to see

- Elements are all exactly 100px wide

**Additional details:**
- On fully up-to-date Arch. Bug appears in freshly built from next branch and in `rofi-git` from the AUR. Bug does not appear in `rofi` from the official Arch repos (`Version: 1.5.4`)
- Screenshot of correct behavior in 1.5.4 from official Arch repo:
![correct](https://user-images.githubusercontent.com/50684139/83228686-5c849280-a14c-11ea-8c6e-131f8db00ac8.png)
- Screenshot of incorrect behavior from freshly built:
![incorrect](https://user-images.githubusercontent.com/50684139/83228688-5d1d2900-a14c-11ea-953c-b75aea4965ec.png)
- Expected behavior occurs when built from d9eb9f25a16b3e95cfc32c3c1076caae58c0ceb1, but unexpected behavior occurs in the next commit on branch next 618d1396eefea6ea26d954e44015c1fa422801f3.
DaveDavenport commented 4 years ago

works fine for me (tm).

rofi-2020-05-29-1551-00000

colbyaustinbrown commented 4 years ago

Thanks for the quick response! The screenshot you shared looks different from both that I shared above. I expect the boxes to all be equal width (100px), but in your screenshot they are exactly as large as their containing text.

DaveDavenport commented 4 years ago

I ran the above theme echo -en "one\ntwo\nthree" | rofi -no-config -theme test.rasi -dmenu

DaveDavenport commented 4 years ago

Can you try the above command? or paste me your whole theme?

output of:

rofi -theme ~/rofi/theme.rasi -dump-theme
colbyaustinbrown commented 4 years ago
/**
 * rofi -dump-theme output.
 * Rofi version: 1.5.4-dev
 **/
element {
    width:            100px ;
    background-color: rgba ( 102, 102, 102, 100 % );
    spacing:          5px ;
}
element-text {
    background-color: rgba ( 0, 0, 0, 0 % );
    text-color:       inherit;
}
element-icon {
    background-color: rgba ( 0, 0, 0, 0 % );
    size:             1.2000ch ;
    text-color:       inherit;
}
listview {
    layout: horizontal;
}
colbyaustinbrown commented 4 years ago

When I run rofi with -no-config I get the exact same thing you got in your screenshot, with all the text visible but the textboxes still being shrunk to be exactly the width of the text instead of whatever width is. Same thing when I remove show-icons: true; from my config. My config file is:

/** Configured For Applets **/

configuration {
  show-icons:         true;
  icon-theme:         "Papirus";
  location: 5;
  yoffset: -50;
  xoffset: -20;
}

Config taken from github.com/adi1090x/rofi since that's what I was originally trying to use.

DaveDavenport commented 4 years ago

Can you try git, I tried to fix it.

colbyaustinbrown commented 4 years ago

Yes, it's working. Thanks so much! :)

I am noticing something similar with the font option inside element blocks. I haven't put together a minimum example yet, although I do see expected behavior when I switch the 1.5.4 release. If I'm able to put together a minimum example, would that be best in a new issue?

DaveDavenport commented 4 years ago

there is a small difference (thanks need to mention this in the release notes) that now font setting needs to be set on element-text. (The default theme inherits from element).

github-actions[bot] commented 3 years ago

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.