diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2021-02-11 13:53:17 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2021-02-11 13:55:21 +0900 |
commit | bea04fd96d4508622b2f5bbe020f161671d119a0 (patch) | |
tree | df5b6fabf233b22e0afab59312869dd6812a47d2 /src/resizabledragwidget.cpp | |
parent | 9ef732aa0682eeb945d8a16839487f30c0e76db5 (diff) | |
download | kvkbd-bea04fd96d4508622b2f5bbe020f161671d119a0.tar.gz kvkbd-bea04fd96d4508622b2f5bbe020f161671d119a0.zip |
Hide resize handle when the keyboard is locked on the screen.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit aae2b175aefd87d06bdf223c323a6b66a75a6a00)
Diffstat (limited to 'src/resizabledragwidget.cpp')
-rw-r--r-- | src/resizabledragwidget.cpp | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/src/resizabledragwidget.cpp b/src/resizabledragwidget.cpp index 9cb3ade..e8f6f09 100644 --- a/src/resizabledragwidget.cpp +++ b/src/resizabledragwidget.cpp @@ -25,8 +25,7 @@ ResizableDragWidget::ResizableDragWidget(TQWidget *parent, const char *name, WFlags f) : DragWidget(parent,name,f) { -rsz=false; - + rsz=false; } @@ -65,7 +64,6 @@ void ResizableDragWidget::mouseMoveEvent(TQMouseEvent * e) int nh = curr.y()-pos.y()+dragP.y(); resize(nw,nh); - } void ResizableDragWidget::mouseReleaseEvent(TQMouseEvent * e) @@ -80,17 +78,24 @@ void ResizableDragWidget::mouseReleaseEvent(TQMouseEvent * e) void ResizableDragWidget::paintEvent(TQPaintEvent *) { + drawResizeHandle(); +} + +void ResizableDragWidget::drawResizeHandle() +{ + if (locked) + { + return; + } TQPainter p(this); - - for (int a=0;a<20;a+=5){ - + for (int a = 0; a < 20; a += 5) + { p.setPen(TQColor(170,0,0)); p.drawLine(width()-20+a,height()-2,width()-2,height()-20+a); p.setPen(TQColor(200,0,0)); p.drawLine(width()-19+a,height()-2,width()-2,height()-19+a); } - } #include "resizabledragwidget.moc" |