mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-21 04:45:31 +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();
|
CGuiApplication::registerMetadata();
|
||||||
CApplication::init(false); // base class without metadata
|
CApplication::init(false); // base class without metadata
|
||||||
|
CGuiApplication::adjustPalette();
|
||||||
this->setWindowIcon(icon);
|
this->setWindowIcon(icon);
|
||||||
this->settingsChanged();
|
this->settingsChanged();
|
||||||
sGui = this;
|
sGui = this;
|
||||||
@@ -665,4 +666,16 @@ namespace BlackGui
|
|||||||
{
|
{
|
||||||
this->checkNewVersion(false);
|
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
|
} // ns
|
||||||
|
|||||||
@@ -229,6 +229,9 @@ namespace BlackGui
|
|||||||
|
|
||||||
//! Check new from menu
|
//! Check new from menu
|
||||||
void checkNewVersionMenu();
|
void checkNewVersionMenu();
|
||||||
|
|
||||||
|
//! Fix the palette for better readibility
|
||||||
|
void adjustPalette();
|
||||||
};
|
};
|
||||||
} // ns
|
} // ns
|
||||||
|
|
||||||
|
|||||||
@@ -534,8 +534,10 @@ QTableView, QTreeView, QListView {
|
|||||||
padding:0px;
|
padding:0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** explicitly setting font color avoids black when pressing CTRL-S **/
|
||||||
QTableView::item:selected {
|
QTableView::item:selected {
|
||||||
background-color: blue;
|
background-color: blue;
|
||||||
|
color: white;
|
||||||
}
|
}
|
||||||
|
|
||||||
QTreeView {
|
QTreeView {
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
/** Works around two issues on Mac OS
|
/**
|
||||||
1. The launcher dialog was entirely transparent
|
Works around two issues on Mac OS
|
||||||
2. Transparency caused the QToolBox labels to be broken
|
1. The launcher dialog was entirely transparent
|
||||||
*/
|
2. Transparency caused the QToolBox labels to be broken
|
||||||
|
**/
|
||||||
QStackedWidget#sw_SwiftLauncher {
|
QStackedWidget#sw_SwiftLauncher {
|
||||||
background-image: url(:/textures/icons/textures/texture-inner.jpg);
|
background-image: url(:/textures/icons/textures/texture-inner.jpg);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user