diff --git a/resources/images/down_arrow.png b/resources/images/down_arrow.png new file mode 100644 index 00000000..a5181768 Binary files /dev/null and b/resources/images/down_arrow.png differ diff --git a/resources/images/left_arrow.png b/resources/images/left_arrow.png new file mode 100644 index 00000000..53e58f20 Binary files /dev/null and b/resources/images/left_arrow.png differ diff --git a/resources/images/right_arrow.png b/resources/images/right_arrow.png new file mode 100644 index 00000000..e9a64d2d Binary files /dev/null and b/resources/images/right_arrow.png differ diff --git a/resources/images/up_arrow.png b/resources/images/up_arrow.png new file mode 100644 index 00000000..10aa5ab3 Binary files /dev/null and b/resources/images/up_arrow.png differ diff --git a/resources/sankore.qrc b/resources/sankore.qrc index 5b7fa1aa..501755ef 100644 --- a/resources/sankore.qrc +++ b/resources/sankore.qrc @@ -322,5 +322,9 @@ style.qss images/cache_circle.png images/cache_square.png + images/down_arrow.png + images/up_arrow.png + images/left_arrow.png + images/right_arrow.png diff --git a/resources/style.qss b/resources/style.qss index dced298b..9f79a645 100644 --- a/resources/style.qss +++ b/resources/style.qss @@ -1,8 +1,12 @@ -QWidget#DockPaletteWidgetBox, QWidget#documentNavigator +QWidget#DockPaletteWidgetBox, +QWidget#documentNavigator, +QWidget#UBLibraryWidget, +QWidget#UBLibPathViewer { background: #EEEEEE; border-radius: 10px; border: 2px solid #999999; +/* padding-bottom: -2px; */ } QColorDialog @@ -32,6 +36,95 @@ QPushButton#DockPaletteWidgetButton::checked background-color: #BBBBBB; } +QScrollBar::vertical +{ + background:transparent; + margin: 23px 1px 25px 1px; +} + +QScrollBar::handle:vertical +{ + border: 2px solid #999999; + border-radius:6px; + background:#BBBBBB; + min-height:40px; +} + +QScrollBar::add-line:vertical +{ + image:url(:/images/down_arrow.png); + height:16px; + background:#BBBBBB; + border:2px solid #999999; + border-radius:6px; + margin: 1px 1px 4px 1px; + subcontrol-position:bottom; + subcontrol-origin:margin; +} + +QScrollBar::sub-line:vertical +{ + image:url(:/images/up_arrow.png); + height:16px; + background:#BBBBBB; + border:2px solid #999999; + border-radius:6px; + margin: 2px 1px 1px 1px; + subcontrol-position:top; + subcontrol-origin:margin; +} + +QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical +{ + background:transparent; +} + + + +QScrollBar::horizontal +{ + background:transparent; + margin: 1px 23px 1px 25px; +} + +QScrollBar::handle:horizontal +{ + border: 2px solid #999999; + border-radius:6px; + background:#BBBBBB; + min-width:40px; +} + +QScrollBar::add-line:horizontal +{ + image:url(:/images/right_arrow.png); + width:16px; + background:#BBBBBB; + border:2px solid #999999; + border-radius:6px; + margin: 1px 1px 1px 4px; + subcontrol-position:right; + subcontrol-origin:margin; +} + +QScrollBar::sub-line:horizontal +{ + image:url(:/images/left_arrow.png); + width:16px; + background:#BBBBBB; + border:2px solid #999999; + border-radius:6px; + margin: 1px 2px 1px 1px; + subcontrol-position:left; + subcontrol-origin:margin; +} + +QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal +{ + background:transparent; +} + + QSlider::handle::horizontal { background-color:#EEEEEE; diff --git a/src/gui/UBDocumentNavigator.cpp b/src/gui/UBDocumentNavigator.cpp index 3f5332fe..53fea402 100644 --- a/src/gui/UBDocumentNavigator.cpp +++ b/src/gui/UBDocumentNavigator.cpp @@ -51,6 +51,8 @@ UBDocumentNavigator::UBDocumentNavigator(QWidget *parent, const char *name):QGra setScene(mScene); mThumbnailWidth = width() - 2*border(); + setFrameShadow(QFrame::Plain); + connect(UBApplication::boardController, SIGNAL(activeSceneChanged()), this, SLOT(addNewPage())); connect(mScene, SIGNAL(selectionChanged()), this, SLOT(onSelectionChanged())); } diff --git a/src/gui/UBLibPathViewer.cpp b/src/gui/UBLibPathViewer.cpp index 5342c740..39af07e7 100644 --- a/src/gui/UBLibPathViewer.cpp +++ b/src/gui/UBLibPathViewer.cpp @@ -37,7 +37,6 @@ UBLibPathViewer::UBLibPathViewer(QWidget *parent, const char *name):QGraphicsVie setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff); setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOn); setAcceptDrops(true); - setStyleSheet(QString("QGraphicsView{background:#EEEEEE; border-radius:10px; border:2px solid #999999;}")); mpScene = new UBPathScene(this); setScene(mpScene); diff --git a/src/gui/UBLibWidget.cpp b/src/gui/UBLibWidget.cpp index de9cf34d..51ffdc16 100644 --- a/src/gui/UBLibWidget.cpp +++ b/src/gui/UBLibWidget.cpp @@ -16,6 +16,7 @@ #include "UBLibWidget.h" #include "core/memcheck.h" +#include "core/UBApplication.h" /** * \brief Constructor @@ -31,6 +32,10 @@ UBLibWidget::UBLibWidget(QWidget *parent, const char *name):UBDockPaletteWidget( { setObjectName(name); mName = "LibWidget"; + + setAttribute(Qt::WA_StyledBackground, true); + setStyleSheet(UBApplication::globalStyleSheet()); + mIconToLeft = QPixmap(":images/library_open.png"); mIconToRight = QPixmap(":images/library_close.png"); setAcceptDrops(true); diff --git a/src/gui/UBLibraryWidget.cpp b/src/gui/UBLibraryWidget.cpp index 65f26cfb..1c0007f7 100644 --- a/src/gui/UBLibraryWidget.cpp +++ b/src/gui/UBLibraryWidget.cpp @@ -37,7 +37,6 @@ UBLibraryWidget::UBLibraryWidget(QWidget *parent, const char *name):UBThumbnailW { setObjectName(name); setSpacing(5); - setStyleSheet(QString("background: #EEEEEE; border-radius : 10px; border : 2px solid #999999;")); mLibraryController = new UBLibraryController(parentWidget()); }