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

Input background color not changing #1431

Closed
f0s3 opened this issue Aug 30, 2024 · 11 comments
Closed

Input background color not changing #1431

f0s3 opened this issue Aug 30, 2024 · 11 comments
Assignees
Labels
Bug P4 Low Maybe wontfix. Most users wont even notice, probably not worth a fix. (Qt Bugs) C: Plugins Issue considering one of the plugins

Comments

@f0s3
Copy link

f0s3 commented Aug 30, 2024

Package source

aur, package named albert

App logs

17:48:37 [crit:albert.qml] QColor input_background_color QVariant(QColor, QColor(ARGB 1, 1, 1, 1))

there are more variables that report critical variables as well, so I'd assume that is not the only variable that doesn't set.

Current Behavior

I'm using i3wm with xorg on arch linux. When I change qml boxmodel property named Input Backgound Coloir in settings > window, it doesn't apply.

Expected Behavior

Expecting this propoerty to apply.

Anything else?

I'm using Widgets BoxModel for now, even though it doesn't give such customizations and has rounded corners which allows for seeing the window background which is black. Using albert with QML BoxModel with white background is unusable for me, because it's too bright. Here's a screenshot showing Widgets BoxModel that I currently use (you can notice the corners are black). I'd much rather deal with corners, than the white background.
2024-08-30_17:54:59

@f0s3
Copy link
Author

f0s3 commented Aug 31, 2024

If main is the latest branch I can work off, I may try to look into it myself. Will just fork the repo, branch off from main in my fork, if I manage to fix it - will create a PR into your main.
@ManuelSchneid3r What do you think?

@f0s3
Copy link
Author

f0s3 commented Aug 31, 2024

I'm not usually coding in cpp, but I looked into the code anyway, and it seems to me that I found where to look at. There is a file called propertyeditor.cpp, now I need to somehow debug what is happening there (maybe put a std::cout, or find a way to attach a debugger).

As soon as I open the style editor, there are a bunch of identical errors, basically for every property in the DefaultStyle.qml.
2024-08-31_14:05:25

I'm currently building from source and launching.

Let me know if you happen to know how do I debug this or maybe yoou know some more info on what is causing these errors.

I will keep you updated on my progress.

@ManuelSchneid3r
Copy link
Member

ManuelSchneid3r commented Aug 31, 2024

accitentially answered in telegram

  • Bildschirmfoto 2024-08-31 um 16 14 16
  • Bildschirmfoto 2024-08-31 um 16 14 24

@f0s3
Copy link
Author

f0s3 commented Aug 31, 2024

Ok, but there is no customization on Widgets BoxModel. Will there ever be something like that? I'm not using a compositor, so rounded corners are displayed as black ones. If it were square it'd be fine by me. Btw, I don't know who you were talking to in telegram, cause I didn't receive any messages :) I'm @f0s30n3 in tg.

@ManuelSchneid3r
Copy link
Member

Comments on github are relayed to the community chat.

There are theme files. But they are going to vanish in the future because I will drop the entire use of Qstylesheets because they don't work well with Qstyle

@ManuelSchneid3r
Copy link
Member

You could just copy an existing theme and drop the border-radius as an intermediate solution

@ManuelSchneid3r ManuelSchneid3r added Bug P4 Low Maybe wontfix. Most users wont even notice, probably not worth a fix. (Qt Bugs) C: Plugins Issue considering one of the plugins labels Sep 14, 2024
@Altyrost
Copy link

Altyrost commented Oct 16, 2024

As soon as I open the style editor, there are a bunch of identical errors, basically for every property in the DefaultStyle.qml.

Reading from the code those aren't errors, I think it's there for debug purpose. See PropertyModel::PropertyModel in propertyeditor.cpp

@Altyrost
Copy link

Altyrost commented Oct 16, 2024

When I change qml boxmodel property named Input Backgound Coloir in settings > window, it doesn't apply

How to reproduce:

  • open settings > props editor
  • open input widget
  • in editor, change InputBackgroundColor from A to B
    -> the input background changes to B
  • put the focus on the input
    -> the input background changes back to A
    -> the value for InputBackgroundColor in the property editor changes back to A

@Altyrost
Copy link

Altyrost commented Oct 16, 2024

Analysis:

For some reasons, QObject::setProperty doesn't seems to break QML bindings. A quick and dirty PoC:

QtObject 
{
  id: style
  
  // ... 
  
  property color input_background_color // : palette.base
  
  // ...
  
  Component.onCompleted: {
      input_background_color = palette.base
  }
}

^ This completely fixes that bug on input_background_color.

@ManuelSchneid3r
Copy link
Member

@Altyrost qml is about to be archived. i was talkin about qstylesheets.

@ManuelSchneid3r
Copy link
Member

Closing since i archived qmlboxmodel. I simply dont have the time to maintain two frontends.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug P4 Low Maybe wontfix. Most users wont even notice, probably not worth a fix. (Qt Bugs) C: Plugins Issue considering one of the plugins
Development

No branches or pull requests

3 participants