Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
3c2e9f25
Commit
3c2e9f25
authored
Sep 20, 2018
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
QT: Fixed rendering artifact when wheel scrolling.
parent
c640322b
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
24 deletions
+32
-24
xtt/lib/flow/qt/flow_draw_qt.cqt
xtt/lib/flow/qt/flow_draw_qt.cqt
+1
-0
xtt/lib/flow/qt/flow_scroll_widget_qt.cqt
xtt/lib/flow/qt/flow_scroll_widget_qt.cqt
+15
-12
xtt/lib/glow/qt/glow_draw_qt.cqt
xtt/lib/glow/qt/glow_draw_qt.cqt
+1
-0
xtt/lib/glow/qt/glow_scroll_widget_qt.cqt
xtt/lib/glow/qt/glow_scroll_widget_qt.cqt
+15
-12
No files found.
xtt/lib/flow/qt/flow_draw_qt.cqt
View file @
3c2e9f25
...
...
@@ -741,6 +741,7 @@ int FlowDrawQt::event_handler(QEvent* event, QWidget* target)
} else if (wheelEvent->delta() < 0) {
sts = basectx->event_handler(flow_eEvent_ScrollDown, 0, 0, 0, 0);
}
basectx->clear(); // For some reason, flow does not redraw after scrolling
break;
}
default:
...
...
xtt/lib/flow/qt/flow_scroll_widget_qt.cqt
View file @
3c2e9f25
...
...
@@ -86,10 +86,13 @@ QWidget* QtScrollWidgetFlow::initScroll(unsigned int eCtxType,
QScrollArea* form = new QScrollArea();
scroll_h = form->horizontalScrollBar();
scroll_v = form->verticalScrollBar();
/*
TODO: this callback resets the scrollbar to 0.
QObject::connect(
scroll_h, SIGNAL(valueChanged(int)), this, SLOT(scroll_h_action(int)));
QObject::connect(
scroll_v, SIGNAL(valueChanged(int)), this, SLOT(scroll_v_action(int)));
*/
form->setWidget(this);
form->setWidgetResizable(true);
...
...
@@ -162,28 +165,28 @@ void QtScrollWidgetFlow::scroll_callback_cb()
if (scroll_data->scroll_h_managed) {
scroll_h_ignore = 1;
scroll_h_value = (double)data->offset_x;
scroll_h_pagesize = data->window_width;
scroll_h_upper = data->total_width;
if (data->window_width != scroll_h_pagesize
|| data->total_width != scroll_h_upper || scroll_configure) {
scroll_data->scroll_h->setMaximum(
scroll_h_upper
);
scroll_data->scroll_h->setPageStep(
scroll_h_pagesize
);
scroll_data->scroll_h->setMaximum(
data->total_width
);
scroll_data->scroll_h->setPageStep(
data->window_width
);
}
scroll_data->scroll_h->setSliderPosition(scroll_h_value);
scroll_data->scroll_h->setSliderPosition(data->offset_x);
scroll_h_value = data->offset_x;
scroll_h_pagesize = data->window_width;
scroll_h_upper = data->total_width;
}
if (scroll_data->scroll_v_managed) {
scroll_v_ignore = 1;
scroll_v_value = (double)data->offset_y;
scroll_v_pagesize = data->window_height;
scroll_v_upper = data->total_height;
if (data->window_height != scroll_v_pagesize
|| data->total_height != scroll_v_upper || scroll_configure) {
scroll_data->scroll_v->setMaximum(
scroll_v_upper
);
scroll_data->scroll_v->setPageStep(
scroll_v_pagesize
);
scroll_data->scroll_v->setMaximum(
data->total_height
);
scroll_data->scroll_v->setPageStep(
data->window_height
);
}
scroll_data->scroll_v->setSliderPosition(scroll_v_value);
scroll_data->scroll_v->setSliderPosition(data->offset_y);
scroll_v_value = data->offset_y;
scroll_v_pagesize = data->window_height;
scroll_v_upper = data->total_height;
}
scroll_configure = 0;
}
...
...
xtt/lib/glow/qt/glow_draw_qt.cqt
View file @
3c2e9f25
...
...
@@ -808,6 +808,7 @@ int GlowDrawQt::event_handler(QEvent* event, QWidget* target)
sts = ctx->event_handler(
glow_eEvent_ScrollDown, wheelEvent->x(), wheelEvent->y(), 0, 0);
}
basectx->clear(); // For some reason, glow does not redraw after scrolling
break;
}
default:
...
...
xtt/lib/glow/qt/glow_scroll_widget_qt.cqt
View file @
3c2e9f25
...
...
@@ -88,10 +88,13 @@ QWidget* QtScrollWidgetGlow::initScroll(unsigned int eCtxType,
QScrollArea* form = new QScrollArea();
scroll_h = form->horizontalScrollBar();
scroll_v = form->verticalScrollBar();
/*
TODO: this callback resets the scrollbar to 0.
QObject::connect(
scroll_h, SIGNAL(valueChanged(int)), this, SLOT(scroll_h_action(int)));
QObject::connect(
scroll_v, SIGNAL(valueChanged(int)), this, SLOT(scroll_v_action(int)));
*/
form->setWidget(this);
form->setWidgetResizable(true);
...
...
@@ -164,28 +167,28 @@ void QtScrollWidgetGlow::scroll_callback_cb()
if (scroll_data->scroll_h_managed) {
scroll_h_ignore = 1;
scroll_h_value = (double)data->offset_x;
scroll_h_pagesize = data->window_width;
scroll_h_upper = data->total_width;
if (data->window_width != scroll_h_pagesize
|| data->total_width != scroll_h_upper || scroll_configure) {
scroll_data->scroll_h->setMaximum(
scroll_h_upper
);
scroll_data->scroll_h->setPageStep(
scroll_h_pagesize
);
scroll_data->scroll_h->setMaximum(
data->total_width
);
scroll_data->scroll_h->setPageStep(
data->window_width
);
}
scroll_data->scroll_h->setSliderPosition(scroll_h_value);
scroll_data->scroll_h->setSliderPosition(data->offset_x);
scroll_h_value = data->offset_x;
scroll_h_pagesize = data->window_width;
scroll_h_upper = data->total_width;
}
if (scroll_data->scroll_v_managed) {
scroll_v_ignore = 1;
scroll_v_value = (double)data->offset_y;
scroll_v_pagesize = data->window_height;
scroll_v_upper = data->total_height;
if (data->window_height != scroll_v_pagesize
|| data->total_height != scroll_v_upper || scroll_configure) {
scroll_data->scroll_v->setMaximum(
scroll_v_upper
);
scroll_data->scroll_v->setPageStep(
scroll_v_pagesize
);
scroll_data->scroll_v->setMaximum(
data->total_height
);
scroll_data->scroll_v->setPageStep(
data->window_height
);
}
scroll_data->scroll_v->setSliderPosition(scroll_v_value);
scroll_data->scroll_v->setSliderPosition(data->offset_y);
scroll_v_value = data->offset_y;
scroll_v_pagesize = data->window_height;
scroll_v_upper = data->total_height;
}
scroll_configure = 0;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment