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

improved foreground text in widgets without focus #114

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gustavo-iniguez-goya
Copy link
Contributor

@gustavo-iniguez-goya gustavo-iniguez-goya commented May 16, 2024

Proposal: For widgets' default state, use primaryColor with less opacity, instead of primaryTextColor.

Issue #85

For widgets' default state, use primaryColor with less opacity,
instead of primaryTextColor.

Issue UN-GCPDS#85
@gustavo-iniguez-goya
Copy link
Contributor Author

Original style (2.14):

dark:
image

light:
image

Proposed style:
image

image

For light theme style maybe is clearer the original style (2.14).

Another option could be to have another primary text color for dark themes (like secondaryDarkColor): primaryTextDarkColor or similar.

@herrfrei
Copy link

herrfrei commented Jun 6, 2024

Hi, this looks fine to me. I see another problem (at least, it was one for me): The styles of several widgets are entered twice (wit different settings):

QDateEdit,
QDateTimeEdit,
QSpinBox,
QDoubleSpinBox,
QTextEdit,
QLineEdit,
QPushButton {
  color: {{primaryColor}};
  background-color: {{secondaryDarkColor}};
  border: 2px solid {{primaryColor}};
  border-radius: 4px;
  height: {{36|density(density_scale, border=2)}}px;
}

QDateEdit,
QDateTimeEdit,
QSpinBox,
QDoubleSpinBox,
QTreeView,
QListView,
QLineEdit,
QComboBox {
  color: {{primaryTextColor}};
  padding-left: {{16|density(density_scale)}}px;
  border-radius: 0px;
  border-radius: 0px;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  height: {{36|density(density_scale, border=2)}}px;
  background-color: {{secondaryColor|opacity(0.75)}};
  border: 2px solid {{secondaryTextColor|opacity(0.2)}};
  border-width: 0 0 2px 0;
}

@Arcitec
Copy link

Arcitec commented Nov 23, 2024

@YeisonCardona This looks like a very important patch. Any possibility of merging? :)

Edit: @gustavo-iniguez-goya Actually... The dark theme looks better, but the light theme looks worse with this change. Too much color and too much fading! I noticed that the old, light theme used black for all unfocused fields, and colors for the focused field. That was great.

Perhaps the more correct fix is not to use "primary highlight color everywhere". But instead to ONLY affect the dark mode, and to use a light-gray color for the unfocused fields in dark mode. Similar to how light mode works.

@Arcitec
Copy link

Arcitec commented Nov 23, 2024

Hmm wait a minute @gustavo-iniguez-goya ... Any idea why your original text looked like that (dark text on dark theme)? Is it a Qt library change maybe? Because the official screenshot for this theme shows that dark mode is working for the theme author, there's no color problem there:

https://github.com/UN-GCPDS/qt-material?tab=readme-ov-file#qt-material

Maybe it's a matter of PySide vs PyQt, or newer GUI library versions breaking the theme, or an OS/platform issue.

@gustavo-iniguez-goya
Copy link
Contributor Author

Yeah @Arcitec . It seems a change from 2.12 to 2.14 #85 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants