Skip to content

Commit

Permalink
Use stylesheet to change background color when editing a property
Browse files Browse the repository at this point in the history
In #818 @dsm mentioned that when property value text
is being edited, the color of text background depends on current
colorscheme (dark/light), which sometimes makes text barely visible.

With this commit the background color of QLineEdit, used to modifying
property value, is set using stylesheet instead of QPalette.
  • Loading branch information
wawuwo committed Jul 8, 2024
1 parent 58a6a75 commit 2f7a57e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qucs/qucs_actions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1319,7 +1319,7 @@ void QucsApp::slotApplyCompText()
z = editText->fontMetrics().lineSpacing();
view->MAy2 += n*z;
editText->setText(s);
misc::setWidgetBackgroundColor(editText,QucsSettings.BGColor);
editText->setStyleSheet("color: black; background-color: " + QucsSettings.BGColor.name());
editText->setFocus();
editText->selectAll();
editText->setParent(Doc->viewport());
Expand Down

0 comments on commit 2f7a57e

Please sign in to comment.