ui: Scrollbar and dock widget separator style
* defined scrollbar style for Windows and Linux * defined dock widget separator width and color * some style fixes on linux
This commit is contained in:
@@ -1,6 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<config>
|
||||
<window>
|
||||
<separator>#CCCCCC</separator>
|
||||
<scrollbar>
|
||||
<background>transparent</background>
|
||||
<handle>#80999999</handle>
|
||||
<line>#80999999</line>
|
||||
</scrollbar>
|
||||
</window>
|
||||
|
||||
<search>
|
||||
<background>#494949</background>
|
||||
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<config>
|
||||
<window>
|
||||
<separator>#A2A2A2</separator>
|
||||
<scrollbar>
|
||||
<background>transparent</background>
|
||||
<handle>#80999999</handle>
|
||||
<line>#80999999</line>
|
||||
</scrollbar>
|
||||
</window>
|
||||
|
||||
<search>
|
||||
<background>white</background>
|
||||
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
|
||||
<config>
|
||||
<window>
|
||||
<separator>#CCC</separator>
|
||||
<scrollbar>
|
||||
<background>transparent</background>
|
||||
<handle>#80999999</handle>
|
||||
<line>#80999999</line>
|
||||
</scrollbar>
|
||||
</window>
|
||||
|
||||
<search>
|
||||
<background>#272728</background>
|
||||
|
||||
|
||||
@@ -4,3 +4,7 @@ QToolTip {
|
||||
font-size: <setting:font_size>px;
|
||||
}
|
||||
|
||||
QMainWindow::separator {
|
||||
background: <color:window/separator>;
|
||||
width: 1px;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
QScrollBar:vertical, QScrollBar:horizontal {
|
||||
background: <color:window/scrollbar/background>;
|
||||
border: none;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
QScrollBar:vertical {
|
||||
width: 15px;
|
||||
border-left: 1px solid <color:window/scrollbar/line>;
|
||||
}
|
||||
|
||||
QScrollBar:horizontal {
|
||||
height: 15px;
|
||||
border-top: 1px solid <color:window/scrollbar/line>;
|
||||
}
|
||||
|
||||
QScrollBar::handle:vertical, QScrollBar::handle:horizontal {
|
||||
background: <color:window/scrollbar/handle>;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
QScrollBar::handle:vertical {
|
||||
width: 8px;
|
||||
margin: 4px 3px;
|
||||
}
|
||||
|
||||
QScrollBar::handle:horizontal {
|
||||
height: 8px;
|
||||
margin: 3px 4px;
|
||||
}
|
||||
|
||||
QScrollBar::add-line:vertical, QScrollBar::add-line:horizontal {
|
||||
background: transparent;
|
||||
border: none;
|
||||
height: 0px;
|
||||
width: 0px;
|
||||
subcontrol-position: bottom;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
|
||||
QScrollBar::sub-line:vertical, QScrollBar::sub-line:horizontal {
|
||||
background: transparent;
|
||||
border: none;
|
||||
height: 0px;
|
||||
width: 0px;
|
||||
subcontrol-position: top;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
|
||||
QAbstractScrollArea::corner {
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-left: 1px solid <color:window/scrollbar/line>;
|
||||
border-top: 1px solid <color:window/scrollbar/line>;
|
||||
}
|
||||
@@ -35,9 +35,10 @@ QTableView {
|
||||
background-color: <color:table/table_line_1/normal>;
|
||||
alternate-background-color: <color:table/table_line_2/normal>;
|
||||
border-radius: 10px;
|
||||
border-bottom-left-radius: 0px;
|
||||
border-bottom-right-radius: 0px;
|
||||
border: 1px solid <color:table/table>;
|
||||
margin: 10px 10px 2px;
|
||||
padding-right: 10px;
|
||||
font-size: <setting:font_size>px;
|
||||
}
|
||||
|
||||
@@ -67,7 +68,7 @@ QHeaderView::section:horizontal {
|
||||
color: <color:table/text/normal>;
|
||||
font-size: <setting:font_size>px;
|
||||
font-weight: bold;
|
||||
padding: 1px 6px;
|
||||
padding: 2px 6px 1px;
|
||||
height: <setting:font_size+5>px;
|
||||
}
|
||||
|
||||
@@ -76,44 +77,7 @@ QHeaderView::section:vertical {
|
||||
border: none;
|
||||
color: <color:table/text/normal>;
|
||||
font-size: <setting:font_size>px;
|
||||
padding-right: 5px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
|
||||
|
||||
QCheckBox {
|
||||
color: <color:table/text/normal>;
|
||||
border-color: <color:table/table>;
|
||||
margin: 0;
|
||||
/*background-color: <color:table/table>;*/
|
||||
}
|
||||
|
||||
QScrollBar:vertical {
|
||||
}
|
||||
|
||||
QScrollBar::handle:vertical {
|
||||
min-height: 20px;
|
||||
}
|
||||
|
||||
QScrollBar::add-line:vertical {
|
||||
height: 20px;
|
||||
subcontrol-position: bottom;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
|
||||
QScrollBar::sub-line:vertical {
|
||||
height: 20px;
|
||||
subcontrol-position: top;
|
||||
subcontrol-origin: margin;
|
||||
}
|
||||
QScrollBar::up-arrow:vertical, QScrollBar::down-arrow:vertical {
|
||||
width: 3px;
|
||||
height: 3px;
|
||||
background: white;
|
||||
}
|
||||
|
||||
QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical {
|
||||
background: none;
|
||||
padding: 2px 5px 1px;
|
||||
}
|
||||
|
||||
QTableView QTableCornerButton::section {
|
||||
|
||||
@@ -228,10 +228,6 @@ void Application::refreshProject(bool force)
|
||||
if (indexing)
|
||||
{
|
||||
m_storageCache->clear();
|
||||
if (m_hasGUI)
|
||||
{
|
||||
m_componentManager->refreshViews();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -309,6 +305,7 @@ void Application::handleMessage(MessageRefresh* message)
|
||||
|
||||
if (m_hasGUI)
|
||||
{
|
||||
m_mainView->refreshView();
|
||||
m_componentManager->refreshViews();
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ public:
|
||||
virtual void loadLayout() = 0;
|
||||
virtual void saveLayout() = 0;
|
||||
|
||||
virtual void refreshView() = 0;
|
||||
|
||||
virtual void hideStartScreen() = 0;
|
||||
virtual void setTitle(const std::string& title) = 0;
|
||||
virtual void activateWindow() = 0;
|
||||
|
||||
@@ -106,7 +106,7 @@ void QtErrorView::initView()
|
||||
|
||||
// Setup Checkboxes
|
||||
QBoxLayout* checkboxes = new QHBoxLayout();
|
||||
checkboxes->setContentsMargins(10, 0, 0, 0);
|
||||
checkboxes->setContentsMargins(10, 3, 0, 3);
|
||||
checkboxes->setSpacing(0);
|
||||
|
||||
{
|
||||
|
||||
@@ -70,6 +70,16 @@ void QtMainView::saveLayout()
|
||||
m_window->saveLayout();
|
||||
}
|
||||
|
||||
void QtMainView::refreshView()
|
||||
{
|
||||
m_onQtThread(
|
||||
[=]()
|
||||
{
|
||||
m_window->refreshStyle();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
QStatusBar* QtMainView::getStatusBar()
|
||||
{
|
||||
return m_window->statusBar();
|
||||
|
||||
@@ -47,6 +47,8 @@ public:
|
||||
virtual void loadLayout();
|
||||
virtual void saveLayout();
|
||||
|
||||
virtual void refreshView();
|
||||
|
||||
virtual void hideStartScreen();
|
||||
virtual void setTitle(const std::string& title);
|
||||
virtual void activateWindow();
|
||||
|
||||
@@ -53,7 +53,7 @@ void QtStatusView::initView()
|
||||
|
||||
// Setup filters
|
||||
QHBoxLayout* filters = new QHBoxLayout();
|
||||
filters->setContentsMargins(10, 0, 0, 0);
|
||||
filters->setContentsMargins(10, 3, 0, 3);
|
||||
filters->setSpacing(25);
|
||||
|
||||
const StatusFilter filter = ApplicationSettings::getInstance()->getStatusFilter();
|
||||
@@ -86,7 +86,10 @@ void QtStatusView::refreshView()
|
||||
utility::setWidgetBackgroundColor(widget, ColorScheme::getInstance()->getColor("error/background"));
|
||||
|
||||
QPalette palette(m_showErrors->palette());
|
||||
palette.setColor(QPalette::WindowText, QColor(ColorScheme::getInstance()->getColor("error/text/normal").c_str()));
|
||||
palette.setColor(QPalette::WindowText, QColor(ColorScheme::getInstance()->getColor("table/text/normal").c_str()));
|
||||
|
||||
m_showErrors->setPalette(palette);
|
||||
m_showInfo->setPalette(palette);
|
||||
|
||||
m_table->updateRows();
|
||||
});
|
||||
|
||||
@@ -122,7 +122,14 @@ QtMainWindow::QtMainWindow()
|
||||
QApplication* app = dynamic_cast<QApplication*>(QCoreApplication::instance());
|
||||
app->installEventFilter(new MouseReleaseFilter(this));
|
||||
|
||||
app->setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath().concat(FilePath("main.css"))).c_str());
|
||||
refreshStyle();
|
||||
|
||||
if (utility::getOsType() != OS_MAC)
|
||||
{
|
||||
// can only be done once, because resetting the style on the QCoreApplication causes crash
|
||||
app->setStyleSheet(
|
||||
utility::getStyleSheet(ResourcePaths::getGuiPath().concat(FilePath("scrollbar.css"))).c_str());
|
||||
}
|
||||
|
||||
m_recentProjectAction = new QAction*[ApplicationSettings::getInstance()->getMaxRecentProjectsCount()];
|
||||
|
||||
@@ -370,6 +377,11 @@ void QtMainWindow::setContentEnabled(bool enabled)
|
||||
}
|
||||
}
|
||||
|
||||
void QtMainWindow::refreshStyle()
|
||||
{
|
||||
setStyleSheet(utility::getStyleSheet(ResourcePaths::getGuiPath().concat(FilePath("main.css"))).c_str());
|
||||
}
|
||||
|
||||
void QtMainWindow::keyPressEvent(QKeyEvent* event)
|
||||
{
|
||||
switch (event->key())
|
||||
|
||||
@@ -78,6 +78,7 @@ public:
|
||||
void updateBookmarksMenu(const std::vector<std::shared_ptr<Bookmark>>& bookmarks);
|
||||
|
||||
void setContentEnabled(bool enabled);
|
||||
void refreshStyle();
|
||||
|
||||
signals:
|
||||
void showScreenSearch();
|
||||
|
||||
Reference in New Issue
Block a user