---
pv/view/view.cpp | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/pv/view/view.cpp b/pv/view/view.cpp
index f3d46b7..4ee1f28 100644
--- a/pv/view/view.cpp
+++ b/pv/view/view.cpp
@@ -313,6 +313,7 @@ void View::show_cursors(bool show)
_show_cursors = show;
_cursorheader->update();
_viewport->update();
+ update_layout();
}
void View::centre_cursors()
@@ -411,17 +412,25 @@ void View::update_scroll()
void View::update_layout()
{
- setViewportMargins(_header->sizeHint().width(),
- _ruler->sizeHint().height() +
_cursorheader->sizeHint().height() - 1, 0, 0);
+ if (_show_cursors) {
+ setViewportMargins(_header->sizeHint().width(),
+ _ruler->sizeHint().height() +
_cursorheader->sizeHint().height(), 0, 0);
+ _cursorheader->setGeometry(
+ _viewport->x(), _ruler->height() + 1,
+ _viewport->width(), _cursorheader->sizeHint().height());
+ _cursorheader->setVisible(true);
+ } else {
+ setViewportMargins(_header->sizeHint().width(),
+ _ruler->sizeHint().height(), 0, 0);
+ _cursorheader->setVisible(false);
+ }
_ruler->setGeometry(
_viewport->x(), 0,
_viewport->width(), _ruler->sizeHint().height());
- _cursorheader->setGeometry(
- _viewport->x(), _ruler->height(),
- _viewport->width(), _cursorheader->sizeHint().height());
_header->setGeometry(
0, _viewport->y(),
_viewport->x(), _viewport->height());
+
update_scroll();
}
--
1.9.0
------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.
Get unparalleled scalability from the best Selenium testing platform available
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel