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
ef00f675
Commit
ef00f675
authored
Jul 03, 2018
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed popup menu location
parent
1902e0b9
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
21 deletions
+29
-21
wb/lib/wb/qt/wb_wnav_qt.cqt
wb/lib/wb/qt/wb_wnav_qt.cqt
+6
-5
wb/lib/wb/qt/wb_wtt_qt.cqt
wb/lib/wb/qt/wb_wtt_qt.cqt
+3
-1
xtt/lib/cow/qt/cow_qt_helpers.cpp
xtt/lib/cow/qt/cow_qt_helpers.cpp
+9
-0
xtt/lib/cow/qt/cow_qt_helpers.h
xtt/lib/cow/qt/cow_qt_helpers.h
+2
-0
xtt/lib/cow/qt/cow_wow_qt.cqt
xtt/lib/cow/qt/cow_wow_qt.cqt
+8
-14
xtt/lib/flow/qt/flow_draw_qt.cqt
xtt/lib/flow/qt/flow_draw_qt.cqt
+1
-1
No files found.
wb/lib/wb/qt/wb_wnav_qt.cqt
View file @
ef00f675
...
...
@@ -79,6 +79,7 @@ extern "C" {
#include <QColor>
#include <QInputDialog>
#include <QScrollArea>
#include <QTimer>
#include <QVBoxLayout>
...
...
@@ -102,11 +103,11 @@ WNavQt::WNavQt(void *xn_parent_ctx, QWidget *xn_parent_wid, const char *xn_name,
trace_obj = new WNavQtTraceObject(this);
debug_print("creating a scrolledbrowwidgetqt\n");
QWidget *scrolledbrow =
scrolledbrowwidgetqt_new(WNav::init_brow_base_cb, this, &brow_widget);
scrolledbrow->set
StyleSheet("QMainWindow{border: 3px solid black;}"
);
QScrollArea *scrolledbrow = ((QScrollArea *)
scrolledbrowwidgetqt_new(WNav::init_brow_base_cb, this, &brow_widget));
scrolledbrow->setFrameShape(QFrame::Box);
scrolledbrow->set
LineWidth(3
);
showNow(brow_widget);
...
...
wb/lib/wb/qt/wb_wtt_qt.cqt
View file @
ef00f675
...
...
@@ -613,7 +613,8 @@ int WttQt::create_popup_menu(pwr_sAttrRef aref, int x, int y)
} else {
return 0;
}
popupmenu_x += 10;
popupmenu_x += palette_paned->pos().x();
popupmenu_y += palette_paned->pos().y();
// Create the menu
sts = get_popup_menu_items(aref, pwr_cNCid);
...
...
@@ -2560,6 +2561,7 @@ QMenu *WttQt::build_submenu(int MenuType, const char *MenuTitle,
if (Items[idx].Item == ldh_eMenuItem_Cascade) {
QMenu *sub = menu->addMenu(fl(Items[idx].Name));
debug_print("build_submenu recursively calling build_submenu to add a submenu\n");
QMenu *w = build_submenu(MENU_PULLDOWN, Items[idx].Name, Callback, Items,
idx + 1);
sub->addMenu(w);
...
...
xtt/lib/cow/qt/cow_qt_helpers.cpp
View file @
ef00f675
...
...
@@ -77,6 +77,15 @@ void dbg_print(const char *file, int line, const char *fmt, ...)
}
}
void
dbg_print
(
QString
str
)
{
if
(
DEBUG
)
{
QByteArray
ba
=
str
.
toLocal8Bit
();
const
char
*
c_str
=
ba
.
data
();
fprintf
(
stderr
,
"%s
\n
"
,
c_str
);
}
}
QString
fl
(
const
char
*
text
)
{
return
QString
::
fromLocal8Bit
(
text
);
...
...
xtt/lib/cow/qt/cow_qt_helpers.h
View file @
ef00f675
...
...
@@ -50,6 +50,8 @@ void print_time(FILE *stream, int fulldate = 0);
void
dbg_print
(
const
char
*
file
,
int
line
,
const
char
*
fmt
,
...);
void
dbg_print
(
QString
str
);
#define debug_print(fmt, args...) \
do { if (DEBUG) { dbg_print(__FILE__, __LINE__, fmt, ##args); } } while (0)
...
...
xtt/lib/cow/qt/cow_wow_qt.cqt
View file @
ef00f675
...
...
@@ -587,31 +587,25 @@ void CoWowQt::PopupPosition(QWidget *parent, int x_event, int y_event, int *x,
int x1 = 0;
int y1 = 0;
int x0 = (int) x_event;
int y0 = (int) y_event;
QPoint p0((int) x_event, (int) y_event);
grandparent = parent->parentWidget();
while (!grandparent->isWindow()) {
if (!x1 && !y1 && (parent->pos().x() || parent->pos().y())) {
// Add first widget with nonzero position
x1 = parent->pos().x();
y1 = parent->pos().y();
x0 += x1;
y0 += y1;
if ( !x1 && !y1 && (parent->geometry().x() || parent->geometry().y())) {
x1 = parent->geometry().x();
y1 = parent->geometry().y();
p0 = parent->mapToParent(p0);
}
parent = grandparent;
grandparent = parent->parentWidget();
}
if (grandparent) {
// Add window widget position
x1 = grandparent->pos().x();
y1 = grandparent->pos().y();
x0 += x1;
y0 += y1;
p0 = grandparent->mapToParent(p0);
}
*x =
x0
;
*y =
y0
;
*x =
p0.x()
;
*y =
p0.y()
;
}
//
...
...
xtt/lib/flow/qt/flow_draw_qt.cqt
View file @
ef00f675
...
...
@@ -395,7 +395,7 @@ int FlowDrawQt::event_handler(QEvent *event)
}
case QEvent::MouseButtonPress: {
QMouseEvent *mouseEvent = ((QMouseEvent *) event);
debug_print("event_handler: MouseButtonPress button=%d
\n", mouseEvent->button
());
debug_print("event_handler: MouseButtonPress button=%d
, x=%d, y=%d, globalX=%d, globalY=%d\n", mouseEvent->button(), mouseEvent->x(), mouseEvent->y(), mouseEvent->globalX(), mouseEvent->globalY
());
switch (mouseEvent->button()) {
case Qt::LeftButton:
basectx->event_handler(flow_eEvent_MB1Down, mouseEvent->x(),
...
...
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