Pavel Sanda wrote: > Pavel Sanda wrote: > > Tommaso Cucinotta wrote: > > > Perhaps a QBoxLayout with some setDirection() called on resize, when > > > detecting some width/height ratio ? > > > > Hardcore version, but much easier:
attached
diff --git a/src/frontends/qt4/GuiViewSource.cpp b/src/frontends/qt4/GuiViewSource.cpp index 70d9324..aec32b7 100644 --- a/src/frontends/qt4/GuiViewSource.cpp +++ b/src/frontends/qt4/GuiViewSource.cpp @@ -77,6 +77,7 @@ ViewSourceWidget::ViewSourceWidget() viewSourceTV->setFont(font); // again, personal taste viewSourceTV->setWordWrapMode(QTextOption::NoWrap); + this->setToolTip(qt_("Double click to toggle buttons visibility.")); } @@ -88,6 +89,17 @@ static size_t crcCheck(docstring const & s) } +void ViewSourceWidget::mouseDoubleClickEvent (QMouseEvent *){ + bool hide=!updatePB->isVisible(); + updatePB->setVisible(hide); + contentsCO->setVisible(hide); + autoUpdateCB->setVisible(hide); + masterPerspectiveCB->setVisible(hide); + outputFormatCO->setVisible(hide); + outputFormatLA->setVisible(hide); +} + + /** get the source code of selected paragraphs, or the whole document \param fullSource get full source code \return true if the content has changed since last call. diff --git a/src/frontends/qt4/GuiViewSource.h b/src/frontends/qt4/GuiViewSource.h index 6d16142..e737113 100644 --- a/src/frontends/qt4/GuiViewSource.h +++ b/src/frontends/qt4/GuiViewSource.h @@ -39,6 +39,8 @@ public: ViewSourceWidget(); /// void setBufferView(BufferView const * bv); + /// + virtual void mouseDoubleClickEvent ( QMouseEvent * event ); public Q_SLOTS: /// update content