Skip to content

Conversation

kyleboyle
Copy link

Allow QLog to adapt to the user's native theme, or allow the user to force a QLog defined light or dark theme independent of the user's current operating system settings.

I did not rename settings so as to allow the existing settings to operate as intended without migrations.

Kapture.2025-07-27.at.17.10.57.webm

@aa5sh
Copy link

aa5sh commented Aug 6, 2025

@kyleboyle one thing I noticed with playing with this some is the inactive colors are not right when switching from native. Notice like the dxcluster send text box and the cw console:
image
image
That's the only thing I noticed that I'm not sure if you could correct or not. Looks good to me otherwise. Michael, AA5SH

@kyleboyle
Copy link
Author

Ok cool I'll take a look. We should have full control over the colours used for either the light or dark settings.

@foldynl foldynl moved this to In Progress in v0.47.0 Roadmap Sep 15, 2025
@aa5sh
Copy link

aa5sh commented Sep 17, 2025

I see where @foldynl is working on this in a testing branch. I was just looking at the code at the setLightMode and it would open the doors for a few other theme options:
image

`
void MainWindow::setBlueTheme()
{
FCT_IDENTIFICATION;

QPalette bluePalette;

// Backgrounds
QColor windowColor   = QColor(235, 240, 255);  // light blue background
QColor baseColor     = QColor(250, 250, 255);  // entry fields
QColor altBaseColor  = QColor(225, 230, 250);  // alternating rows

// Text colors
QColor textColor     = QColor(0, 0, 50);       // dark navy text
QColor disabledColor = QColor(150, 150, 170);  // muted blue-gray

// Buttons
QColor buttonColor   = QColor(230, 235, 250);  
QColor buttonText    = QColor(0, 0, 80);

// Highlights
QColor linkColor     = QColor(0, 51, 153);     // deep blue link
QColor highlight     = QColor(102, 153, 255);  // selection blue
QColor highlightText = Qt::white;

bluePalette.setColor(QPalette::Window, windowColor);
bluePalette.setColor(QPalette::WindowText, textColor);
bluePalette.setColor(QPalette::Base, baseColor);
bluePalette.setColor(QPalette::AlternateBase, altBaseColor);
bluePalette.setColor(QPalette::Text, textColor);
bluePalette.setColor(QPalette::Button, buttonColor);
bluePalette.setColor(QPalette::ButtonText, buttonText);
bluePalette.setColor(QPalette::BrightText, Qt::white);
bluePalette.setColor(QPalette::Link, linkColor);
bluePalette.setColor(QPalette::Highlight, highlight);
bluePalette.setColor(QPalette::HighlightedText, highlightText);

// Disabled state
bluePalette.setColor(QPalette::Disabled, QPalette::Text, disabledColor);
bluePalette.setColor(QPalette::Disabled, QPalette::ButtonText, disabledColor);
bluePalette.setColor(QPalette::Disabled, QPalette::HighlightedText, disabledColor);

qApp->setPalette(bluePalette);

}
`

@foldynl
Copy link
Owner

foldynl commented Sep 18, 2025

Yes, I have rebased this PR and modified/fxed it in a new branch. I plan to release it in the next release.

As for other themes, I don’t think this is the right approach. Qt itself already has styles that can be set using the -style parameter. If someone prefers a different style, it can be defined through this mechanism.

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

Successfully merging this pull request may close these issues.

3 participants