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
6e56779c
Commit
6e56779c
authored
Sep 11, 2013
by
Claes Sjofors
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ge pulldown menu, submenu textsize and event coordinates bugfix (refs #165)
parent
ddd84fe8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
xtt/lib/glow/src/glow_growmenu.cpp
xtt/lib/glow/src/glow_growmenu.cpp
+8
-7
No files found.
xtt/lib/glow/src/glow_growmenu.cpp
View file @
6e56779c
...
@@ -345,8 +345,8 @@ int GrowMenu::local_event_handler( GlowWind *w, glow_eEvent event, double x, dou
...
@@ -345,8 +345,8 @@ int GrowMenu::local_event_handler( GlowWind *w, glow_eEvent event, double x, dou
if
(
ll_x
<=
x
&&
x
<=
ur_x
&&
if
(
ll_x
<=
x
&&
x
<=
ur_x
&&
ll_y
<=
y
&&
y
<=
ur_y
)
{
ll_y
<=
y
&&
y
<=
ur_y
)
{
int
item
;
int
item
;
double
vscale
=
trf
.
vertical_scale
(
0
);
double
vscale
=
1
;
//
trf.vertical_scale(0);
//cout << "Event handler: Hit in menu
"
<< endl;
//cout << "Event handler: Hit in menu
" << this
<< endl;
item
=
int
((
y
-
ll
.
y
)
/
(
item_height
/
vscale
/
w
->
zoom_factor_y
));
item
=
int
((
y
-
ll
.
y
)
/
(
item_height
/
vscale
/
w
->
zoom_factor_y
));
if
(
item
>
item_cnt
-
1
)
if
(
item
>
item_cnt
-
1
)
...
@@ -381,10 +381,10 @@ int GrowMenu::local_event_handler( GlowWind *w, glow_eEvent event, double x, dou
...
@@ -381,10 +381,10 @@ int GrowMenu::local_event_handler( GlowWind *w, glow_eEvent event, double x, dou
int
GrowMenu
::
event_handler
(
GlowWind
*
w
,
glow_eEvent
event
,
double
fx
,
double
fy
)
int
GrowMenu
::
event_handler
(
GlowWind
*
w
,
glow_eEvent
event
,
double
fx
,
double
fy
)
{
{
double
x
,
y
;
//
double x, y;
trf
.
reverse
(
fx
,
fy
,
&
x
,
&
y
);
//
trf.reverse( fx, fy, &x, &y);
return
local_event_handler
(
w
,
event
,
x
,
y
);
return
local_event_handler
(
w
,
event
,
fx
,
f
y
);
}
}
int
GrowMenu
::
event_handler
(
GlowWind
*
w
,
glow_eEvent
event
,
int
x
,
int
y
,
double
fx
,
int
GrowMenu
::
event_handler
(
GlowWind
*
w
,
glow_eEvent
event
,
int
x
,
int
y
,
double
fx
,
...
@@ -396,7 +396,8 @@ int GrowMenu::event_handler( GlowWind *w, glow_eEvent event, int x, int y, doubl
...
@@ -396,7 +396,8 @@ int GrowMenu::event_handler( GlowWind *w, glow_eEvent event, int x, int y, doubl
double
rx
,
ry
;
double
rx
,
ry
;
// Convert koordinates to local koordinates
// Convert koordinates to local koordinates
trf
.
reverse
(
fx
,
fy
,
&
rx
,
&
ry
);
//trf.reverse( fx, fy, &rx, &ry);
rx
=
fx
;
ry
=
fy
;
sts
=
0
;
sts
=
0
;
if
(
event
==
ctx
->
event_move_node
)
{
if
(
event
==
ctx
->
event_move_node
)
{
...
@@ -494,7 +495,7 @@ void GrowMenu::get_menu_char( int *t_size, glow_eDrawType *fill_color, glow_eDra
...
@@ -494,7 +495,7 @@ void GrowMenu::get_menu_char( int *t_size, glow_eDrawType *fill_color, glow_eDra
glow_eDrawType
*
t_color
,
glow_eDrawType
*
t_color_disabled
,
glow_eDrawType
*
t_color
,
glow_eDrawType
*
t_color_disabled
,
glow_eFont
*
t_font
)
glow_eFont
*
t_font
)
{
{
*
t_size
=
text_size
;
*
t_size
=
(
int
)(
trf
.
vertical_scale
(
0
)
*
(
text_size
+
4
)
-
4
)
;
*
fill_color
=
fill_drawtype
;
*
fill_color
=
fill_drawtype
;
*
t_drawtype
=
text_drawtype
;
*
t_drawtype
=
text_drawtype
;
*
t_color
=
text_color
;
*
t_color
=
text_color
;
...
...
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