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:
Klaus Basan
2017-06-11 21:31:49 +02:00
parent 79556260bd
commit 7a75413fc1
4 changed files with 23 additions and 4 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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 {

View File

@@ -1,7 +1,8 @@
/** Works around two issues on Mac OS /**
Works around two issues on Mac OS
1. The launcher dialog was entirely transparent 1. The launcher dialog was entirely transparent
2. Transparency caused the QToolBox labels to be broken 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);
} }