View Single Post
Old 04-13-2024, 07:40 PM   #58
KevinH
Sigil Developer
KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.KevinH ought to be getting tired of karma fortunes by now.
 
Posts: 7,727
Karma: 5444398
Join Date: Nov 2009
Device: many
@BeckyEbook,

I just can not find a viable solution for the horrible buttons when using the focus qss on QComboBox and QSpinner that will actually work on macOS which mixes in native popup menus.

If I restrict it to QTreeView, QListView, QTableView, QLineEdit, QPlainTextEdit, QTextEdit, QScrollArea it seems to do a decent job of coverage. The macOS style already has its own highlight focus that works well for QMessageBox buttons, QComboBoxes, and QSpinBoxes.

We can of course adjust that list be platform specific.

If you get a chance, would you try that list in your qt_styles.qss and let me know what you think.

So something like:

QTextView:focus, QPlainTextEdit:focus, ... { border: 1px solid red; }

If you think I should add other classes, just let me know.

Update:

Since macOS already has focus rectangles on just about all of their buttons and fields in a blue color, it is jarring to see the red border at times.

So I think we can make that qss take a value passed in for the color of the Focus Highlight that is specific to each system.

On macOS, this turns out to be #2B5FFE which is a blue of some sort.


I would love to know the system focus highlight color for Windows so we can use it on Windows, and possibly something for Linux.

Luckily the focus highlight color on macOS only changes slightly from Light to Dark mode so picking a single color for the border works just fine.

Hopefully that is true for Windows as well.

I will check out Linux (Manjaro under KDE Plasma 5 tomorrow).

If needed we can choose the QPalette::Highlight color from the system palatte as it seems to be quite close on macOS as well.


Thanks!

Last edited by KevinH; 04-13-2024 at 10:34 PM.
KevinH is online now   Reply With Quote