From 951bc5c3b59d1710fefd52d22fe50a07f5640e08 Mon Sep 17 00:00:00 2001 From: Mark Liversedge Date: Mon, 11 Mar 2013 13:21:05 +0000 Subject: [PATCH] UI Nits: Splitter handle show/hide button gone .. taking out last remnants in the code from previous design. This will also remove the focus block that appears on calendar handle in diary view, but only really visible on Linux with Gtk/Gnome. --- src/GcSideBarItem.cpp | 37 ------------------------------------- src/GcSideBarItem.h | 7 ------- 2 files changed, 44 deletions(-) diff --git a/src/GcSideBarItem.cpp b/src/GcSideBarItem.cpp index a68e0e298..dcb6c216e 100644 --- a/src/GcSideBarItem.cpp +++ b/src/GcSideBarItem.cpp @@ -256,16 +256,7 @@ GcSplitterHandle::GcSplitterHandle(QString title, GcSplitterItem *widget, Qt::Or font.setWeight(QFont::Black); titleLabel->setFont(font); - showHide = new QPushButton(this); - showHide->setStyleSheet("QPushButton {color : blue;background: transparent}"); - showHide->setFixedWidth(16); - state = true; - //showHideClicked(); - //titleLayout->addWidget(showHide); - //connect(showHide, SIGNAL(clicked(bool)), this, SLOT(showHideClicked())); - titleLayout->addSpacing(10); - titleLayout->addWidget(titleLabel); titleLayout->addStretch(); @@ -339,34 +330,6 @@ GcSplitterHandle::paintBackground(QPaintEvent *) painter.restore(); } -void -GcSplitterHandle::setExpanded(bool expanded) -{ - - state = expanded; - if (expanded == false) { - showHide->setIcon(widget->icon);//QIcon(*show)); - titleLabel->setStyleSheet("QLabel { color: gray; }"); - fullHeight = widget->height(); - widget->setFixedHeight(0); - } else { - showHide->setIcon(widget->icon);//QIcon(*hide)); - titleLabel->setStyleSheet("QLabel { color: black; }"); - widget->setBaseSize(widget->width(), fullHeight); - widget->setMaximumSize(QWIDGETSIZE_MAX,QWIDGETSIZE_MAX); - widget->setMinimumSize(0,0); - } - showHide->setChecked(false); - repaint(); -} - -void -GcSplitterHandle::showHideClicked() -{ - state = !state; - setExpanded(state); -} - GcSplitterControl::GcSplitterControl(QWidget *parent) : QToolBar(parent) { setContentsMargins(0,0,0,0); diff --git a/src/GcSideBarItem.h b/src/GcSideBarItem.h index e4c3a23a0..7ca72fee8 100644 --- a/src/GcSideBarItem.h +++ b/src/GcSideBarItem.h @@ -103,11 +103,6 @@ protected: GcSubSplitter *gcSplitter; int index; -public slots: - void showHideClicked(); - - void setExpanded(bool expanded); - private: void paintBackground(QPaintEvent *); @@ -116,11 +111,9 @@ private: QHBoxLayout *titleLayout; GcLabel *titleLabel; QToolBar *titleToolbar; - QPushButton *showHide; QString title; int fullHeight; - bool state; QLinearGradient active, inactive; };