davatorium / rofi

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

[BUG] Rofi Text Color Broken After Upgrade? #1395

Closed yonderbread closed 3 years ago

yonderbread commented 3 years ago

Version

Output of rofi -v Version: 1.7.0

Output of rofi -help (in a gist, please paste the full output)

https://gist.github.com/yonderbread/d0305dc99df4acc96b3bdb64c1c1a197

Note: Seems that width is not a valid option??

Launch Command

rofi -theme ~/.config/rofi/themes/dracula.rasi -show drun -show-icons -icon-theme -lines 8 \"Papirus\"

Steps to reproduce

Note: I just updated my arch packages with sudo pacman -Syuu, not sure if it updated rofi or not but it was working just fine before the upgrade.

What behaviour you see

Screen Recording: https://streamable.com/i3j0yk

What behaviour you expect to see

My rofi text color in my theme should be white.

Rofi theme:


/*Dracula theme based on the Purple official rofi theme*/

* {
    font: "Jetbrains Mono 12";
    foreground: #f8f8f2;
    background-color: #282a36;
    active-background: #6272a4;
    urgent-background: #ff5555;
    selected-background: @active-background;
    selected-urgent-background: @urgent-background;
    selected-active-background: @active-background;
    separatorcolor: @active-background;
    bordercolor: @active-background;
}

#window {
    background-color: @background;
    border:           1;
    border-radius: 6;
    border-color: @bordercolor;
    padding:          5;
}
#mainbox {
    border:  0;
    padding: 0;
}
#message {
    border:       1px dash 0px 0px ;
    border-color: @separatorcolor;
    padding:      1px ;
}
#textbox {
    text-color: @foreground;
}
#listview {
    fixed-height: 0;
    border:       2px dash 0px 0px ;
    border-color: @bordercolor;
    spacing:      2px ;
    scrollbar:    false;
    padding:      2px 0px 0px ;
}
#element {
    border:  0;
    padding: 1px ;
}
#element.normal.normal {
    background-color: @background;
    text-color:       @foreground;
}
#element.normal.urgent {
    background-color: @urgent-background;
    text-color:       @urgent-foreground;
}
#element.normal.active {
    background-color: @active-background;
    text-color:       @foreground;
}
#element.selected.normal {
    background-color: @selected-background;
    text-color:       @foreground;
}
#element.selected.urgent {
    background-color: @selected-urgent-background;
    text-color:       @foreground;
}
#element.selected.active {
    background-color: @selected-active-background;
    text-color:       @foreground;
}
#element.alternate.normal {
    background-color: @background;
    text-color:       @foreground;
}
#element.alternate.urgent {
    background-color: @urgent-background;
    text-color:       @foreground;
}
#element.alternate.active {
    background-color: @active-background;
    text-color:       @foreground;
}
#scrollbar {
    width:        2px ;
    border:       0;
    handle-width: 8px ;
    padding:      0;
}
#sidebar {
    border:       2px dash 0px 0px ;
    border-color: @separatorcolor;
}
#button.selected {
    background-color: @selected-background;
    text-color:       @foreground;
}
#inputbar {
    spacing:    0;
    text-color: @foreground;
    padding:    1px ;
}
#case-indicator {
    spacing:    0;
    text-color: @foreground;
}
#entry {
    spacing:    0;
    text-color: @foreground;
}
#prompt {
    spacing:    0;
    text-color: @foreground;
}
#inputbar {
    children:   [ prompt,textbox-prompt-colon,entry,case-indicator ];
}
#textbox-prompt-colon {
    expand:     false;
    str:        ":";
    margin:     0px 0.3em 0em 0em ;
    text-color: @foreground;
}```
dieggsy commented 3 years ago

I'm seeing background-color not working properly for element.selected:

Relevant code:

element {
    padding:10;
    border: 1 0 0 0;
}

element.selected {
    background-color: #3C3836;
    border: 1 0 0 0;
}

Screenshot: 2021-08-30_15:23:57

yonderbread commented 3 years ago

I'm seeing background-color not working properly for element.selected:

Relevant code:

element {
    padding:10;
    border: 1 0 0 0;
}

element.selected {
    background-color: #3C3836;
    border: 1 0 0 0;
}

Screenshot: 2021-08-30_15:23:57

I'm also getting this issue with other rofi themes.

dieggsy commented 3 years ago

Aaand, this is why we should read the release notes people, my bad. The following fixed my issues:

element-text {
    background-color: inherit;
    text-color:       inherit;
}

element-icon {
    background-color: inherit;
}
yonderbread commented 3 years ago

@dieggsy ohh, I just didn't know if my rofi got updated or not. Whoops. Lemme give that a try.

dieggsy commented 3 years ago

@yonderbread as for the width, I found this in the man page:

IMPORTANT: In newer rofi releases, all the theming options have been moved into the new theme format. They are no longer normal rofi options that can be passed directly on the command line (there are too many). Small snippets can be passed on the command line: rofi -theme-str 'window {width: 50%;}' to override a single setting. They are merged into the current theme. They can also be appended at the end of the rofi config file to override parts of the theme.

So you may have to specify it in window { ... } now as opposed to configuration { ... }, or at least that seems to be working for me. Though I didn't see mention of this in the release notes.

DaveDavenport commented 3 years ago

Aaand, this is why we should read the release notes people, my bad. The following fixed my issues:

element-text {
    background-color: inherit;
    text-color:       inherit;
}

element-icon {
    background-color: inherit;
}

Yes, this change was introduced two releases back, the old system had some "hot patch" code to try to patch themes while loading. That code (As it caused some issues) was removed.

charbelnicolas commented 3 years ago

I need some help, I can't get rid of the dashed line at the top of the listview, anyone have any ideas? It wasn't showing before the update.

DaveDavenport commented 3 years ago

I need some help, I can't get rid of the dashed line at the top of the listview, anyone have any ideas? It wasn't showing before the update.

please do not highjack issues. Please read the release notes and post an issue in the discussion forum.

No point on thumbsdown, it is very clearly stated in the guidelines why issue highjacks are not accepted.

DaveDavenport commented 3 years ago

I assume the issue is fixed, please reply if it isn't. (sorry for closing so quickly, but I want to avoid people using this as a general question and answer discussion place).

jstkdng commented 3 years ago

hey @DaveDavenport you might get more issues due to more users (mindlessly) updating, pinning this issue might help, I also had this problem with oxide.rasi and adding the element-text block helped

yonderbread commented 3 years ago

Found that you can add the rofi flag, -upgrade-config. Didn't realise this was a thing until I had manually went and edited my config to match the new syntax rules; might help some people out though.