mirror of
https://github.com/YACReader/yacreader
synced 2025-06-03 09:08:20 -04:00
Use theme in the main window.
This commit is contained in:
parent
8881ef885d
commit
c943dd205f
@ -170,11 +170,8 @@ void LibraryWindow::doLayout()
|
|||||||
{
|
{
|
||||||
//LAYOUT ELEMENTS------------------------------------------------------------
|
//LAYOUT ELEMENTS------------------------------------------------------------
|
||||||
auto sHorizontal = new QSplitter(Qt::Horizontal); //spliter principal
|
auto sHorizontal = new QSplitter(Qt::Horizontal); //spliter principal
|
||||||
#ifdef Q_OS_MAC
|
|
||||||
sHorizontal->setStyleSheet("QSplitter::handle{image:none;background-color:#B8B8B8;} QSplitter::handle:vertical {height:1px;}");
|
sHorizontal->setStyleSheet(theme.mainWindowHorizontalSpliterStyle);
|
||||||
#else
|
|
||||||
sHorizontal->setStyleSheet("QSplitter::handle:vertical {height:4px;}");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//TOOLBARS-------------------------------------------------------------------
|
//TOOLBARS-------------------------------------------------------------------
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
@ -265,9 +262,9 @@ void LibraryWindow::doLayout()
|
|||||||
connect(noLibrariesWidget, SIGNAL(addExistingLibrary()), this, SLOT(showAddLibrary()));
|
connect(noLibrariesWidget, SIGNAL(addExistingLibrary()), this, SLOT(showAddLibrary()));
|
||||||
|
|
||||||
//collapsible disabled in macosx (only temporaly)
|
//collapsible disabled in macosx (only temporaly)
|
||||||
#ifdef Q_OS_MAC
|
if (theme.isMacosNative) {
|
||||||
sHorizontal->setCollapsible(0, false);
|
sHorizontal->setCollapsible(0,false);
|
||||||
#endif
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LibraryWindow::doDialogs()
|
void LibraryWindow::doDialogs()
|
||||||
@ -1701,7 +1698,8 @@ void LibraryWindow::createLibrary()
|
|||||||
void LibraryWindow::create(QString source, QString dest, QString name)
|
void LibraryWindow::create(QString source, QString dest, QString name)
|
||||||
{
|
{
|
||||||
QLOG_INFO() << QString("About to create a library from '%1' to '%2' with name '%3'").arg(source).arg(dest).arg(name);
|
QLOG_INFO() << QString("About to create a library from '%1' to '%2' with name '%3'").arg(source).arg(dest).arg(name);
|
||||||
libraryCreator->createLibrary(source, dest);
|
|
||||||
|
libraryCreator->createLibrary(source,dest);
|
||||||
libraryCreator->start();
|
libraryCreator->start();
|
||||||
_lastAdded = name;
|
_lastAdded = name;
|
||||||
_sourceLastAdded = source;
|
_sourceLastAdded = source;
|
||||||
@ -2250,9 +2248,10 @@ void LibraryWindow::showNoLibrariesWidget()
|
|||||||
|
|
||||||
void LibraryWindow::showRootWidget()
|
void LibraryWindow::showRootWidget()
|
||||||
{
|
{
|
||||||
#ifndef Q_OS_MAC
|
if (!theme.isMacosNative) {
|
||||||
libraryToolBar->setDisabled(false);
|
libraryToolBar->setDisabled(false);
|
||||||
#endif
|
}
|
||||||
|
|
||||||
libraryToolBar->searchEdit->setEnabled(true);
|
libraryToolBar->searchEdit->setEnabled(true);
|
||||||
mainWidget->setCurrentIndex(0);
|
mainWidget->setCurrentIndex(0);
|
||||||
}
|
}
|
||||||
@ -2261,9 +2260,11 @@ void LibraryWindow::showImportingWidget()
|
|||||||
{
|
{
|
||||||
disableAllActions();
|
disableAllActions();
|
||||||
importWidget->clear();
|
importWidget->clear();
|
||||||
#ifndef Q_OS_MAC
|
|
||||||
|
if (!theme.isMacosNative) {
|
||||||
libraryToolBar->setDisabled(true);
|
libraryToolBar->setDisabled(true);
|
||||||
#endif
|
}
|
||||||
|
|
||||||
libraryToolBar->searchEdit->setDisabled(true);
|
libraryToolBar->searchEdit->setDisabled(true);
|
||||||
mainWidget->setCurrentIndex(2);
|
mainWidget->setCurrentIndex(2);
|
||||||
}
|
}
|
||||||
|
@ -117,6 +117,8 @@ public:
|
|||||||
|
|
||||||
"QHeaderView::section:horizontal {background-color:#F5F5F5; border-bottom:1px solid #B8BDC4; border-right:1px solid qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #D1D1D1, stop: 1 #B8BDC4); border-left:none; border-top:none; padding:4px; color:#313232;}"
|
"QHeaderView::section:horizontal {background-color:#F5F5F5; border-bottom:1px solid #B8BDC4; border-right:1px solid qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #D1D1D1, stop: 1 #B8BDC4); border-left:none; border-top:none; padding:4px; color:#313232;}"
|
||||||
"QHeaderView::section:vertical {border-bottom: 1px solid #DFDFDF;border-top: 1px solid #FEFEFE;}";
|
"QHeaderView::section:vertical {border-bottom: 1px solid #DFDFDF;border-top: 1px solid #FEFEFE;}";
|
||||||
|
|
||||||
|
t.mainWindowHorizontalSpliterStyle = "QSplitter::handle{image:none;background-color:#B8B8B8;} QSplitter::handle:vertical {height:1px;}";
|
||||||
} else {
|
} else {
|
||||||
t.isMacosNative = false;
|
t.isMacosNative = false;
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
@ -235,6 +237,7 @@ public:
|
|||||||
"QHeaderView::section:horizontal {background-color:#F5F5F5; border-bottom:1px solid #B8BDC4; border-right:1px solid qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #D1D1D1, stop: 1 #B8BDC4); border-left:none; border-top:none; padding:4px; color:#313232;}"
|
"QHeaderView::section:horizontal {background-color:#F5F5F5; border-bottom:1px solid #B8BDC4; border-right:1px solid qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #D1D1D1, stop: 1 #B8BDC4); border-left:none; border-top:none; padding:4px; color:#313232;}"
|
||||||
"QHeaderView::section:vertical {border-bottom: 1px solid #DFDFDF;border-top: 1px solid #FEFEFE;}";
|
"QHeaderView::section:vertical {border-bottom: 1px solid #DFDFDF;border-top: 1px solid #FEFEFE;}";
|
||||||
|
|
||||||
|
t.mainWindowHorizontalSpliterStyle = "QSplitter::handle:vertical {height:4px;}";
|
||||||
}
|
}
|
||||||
|
|
||||||
return t;
|
return t;
|
||||||
@ -360,6 +363,9 @@ public:
|
|||||||
|
|
||||||
//TableView (comics)
|
//TableView (comics)
|
||||||
QString tableViewStyle;
|
QString tableViewStyle;
|
||||||
|
|
||||||
|
//Main window
|
||||||
|
QString mainWindowHorizontalSpliterStyle;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // THEME_H
|
#endif // THEME_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user