mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-23 07:15:35 +08:00
Ref T84, fix for better readibility of news / hyperlinks
* adjust palette to change link color: hardcoded, but no other way per stylesheet * stylesheet fix to avoid black font in table view (CTRL S) Remark: Currently we just display the blog page as news, which is not correctly formatted, but somehow works. In the future we might use a tailored HTML page for that.
This commit is contained in:
@@ -79,6 +79,7 @@ namespace BlackGui
|
||||
{
|
||||
CGuiApplication::registerMetadata();
|
||||
CApplication::init(false); // base class without metadata
|
||||
CGuiApplication::adjustPalette();
|
||||
this->setWindowIcon(icon);
|
||||
this->settingsChanged();
|
||||
sGui = this;
|
||||
@@ -665,4 +666,16 @@ namespace BlackGui
|
||||
{
|
||||
this->checkNewVersion(false);
|
||||
}
|
||||
|
||||
void CGuiApplication::adjustPalette()
|
||||
{
|
||||
// only way to change link color
|
||||
// https://stackoverflow.com/q/5497799/356726
|
||||
// Ref T84
|
||||
QPalette newPalette(qApp->palette());
|
||||
const QColor linkColor(135, 206, 250);
|
||||
newPalette.setColor(QPalette::Link, linkColor);
|
||||
newPalette.setColor(QPalette::LinkVisited, linkColor);
|
||||
qApp->setPalette(newPalette);
|
||||
}
|
||||
} // ns
|
||||
|
||||
@@ -229,6 +229,9 @@ namespace BlackGui
|
||||
|
||||
//! Check new from menu
|
||||
void checkNewVersionMenu();
|
||||
|
||||
//! Fix the palette for better readibility
|
||||
void adjustPalette();
|
||||
};
|
||||
} // ns
|
||||
|
||||
|
||||
@@ -534,8 +534,10 @@ QTableView, QTreeView, QListView {
|
||||
padding:0px;
|
||||
}
|
||||
|
||||
/** explicitly setting font color avoids black when pressing CTRL-S **/
|
||||
QTableView::item:selected {
|
||||
background-color: blue;
|
||||
color: white;
|
||||
}
|
||||
|
||||
QTreeView {
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
/** Works around two issues on Mac OS
|
||||
1. The launcher dialog was entirely transparent
|
||||
2. Transparency caused the QToolBox labels to be broken
|
||||
*/
|
||||
/**
|
||||
Works around two issues on Mac OS
|
||||
1. The launcher dialog was entirely transparent
|
||||
2. Transparency caused the QToolBox labels to be broken
|
||||
**/
|
||||
QStackedWidget#sw_SwiftLauncher {
|
||||
background-image: url(:/textures/icons/textures/texture-inner.jpg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user