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
7df9937e
Commit
7df9937e
authored
Apr 04, 2019
by
Christoffer Ackelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed subwindow drawing in grow. subwindow_scale was initialized to 0 when it should be 1...
parent
bd0620fc
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
3 deletions
+40
-3
xtt/lib/glow/gtk/glow_draw_gtk.h
xtt/lib/glow/gtk/glow_draw_gtk.h
+16
-0
xtt/lib/glow/qt/glow_draw_qt.h
xtt/lib/glow/qt/glow_draw_qt.h
+12
-0
xtt/lib/glow/src/glow_draw.h
xtt/lib/glow/src/glow_draw.h
+3
-0
xtt/lib/glow/src/glow_growctx.cpp
xtt/lib/glow/src/glow_growctx.cpp
+4
-1
xtt/lib/glow/src/glow_growwindow.cpp
xtt/lib/glow/src/glow_growwindow.cpp
+5
-2
No files found.
xtt/lib/glow/gtk/glow_draw_gtk.h
View file @
7df9937e
...
...
@@ -54,12 +54,28 @@ class DrawWindGtk : public DrawWind {
public:
DrawWindGtk
()
{
subwindow_scale
=
1
;
memset
(
clip_rectangle
,
0
,
sizeof
(
clip_rectangle
));
}
GdkWindow
*
window
=
NULL
;
GdkPixmap
*
buffer
=
NULL
;
GdkRectangle
clip_rectangle
[
DRAW_CLIP_SIZE
];
GdkPixmap
*
background_pixmap
=
NULL
;
DrawWind
*
copy
()
{
DrawWindGtk
*
tmp
=
new
DrawWindGtk
();
tmp
->
clip_on
=
this
->
clip_on
;
tmp
->
clip_cnt
=
this
->
clip_cnt
;
tmp
->
window
=
this
->
window
;
tmp
->
buffer
=
this
->
buffer
;
memcpy
(
tmp
->
clip_rectangle
,
this
->
clip_rectangle
,
sizeof
(
this
->
clip_rectangle
));
tmp
->
background_pixmap
=
this
->
background_pixmap
;
return
tmp
;
}
virtual
void
update_buffer
(
DrawWind
*
w
)
{
this
->
buffer
=
((
DrawWindGtk
*
)
w
)
->
buffer
;
}
};
class
GlowDrawGtk
:
public
GlowDraw
{
...
...
xtt/lib/glow/qt/glow_draw_qt.h
View file @
7df9937e
...
...
@@ -60,6 +60,7 @@ class DrawWindQt : public DrawWind {
public:
DrawWindQt
()
{
subwindow_scale
=
1
;
memset
(
clip_rectangle
,
0
,
sizeof
(
clip_rectangle
));
}
...
...
@@ -67,6 +68,17 @@ public:
QImage
*
buffer
=
NULL
;
QRect
clip_rectangle
[
DRAW_CLIP_SIZE
];
QPixmap
*
background_pixmap
=
NULL
;
DrawWind
*
copy
()
{
DrawWindQt
*
tmp
=
new
DrawWindQt
();
tmp
->
clip_on
=
this
->
clip_on
;
tmp
->
clip_cnt
=
this
->
clip_cnt
;
tmp
->
window
=
this
->
window
;
tmp
->
buffer
=
this
->
buffer
;
memcpy
(
tmp
->
clip_rectangle
,
this
->
clip_rectangle
,
sizeof
(
this
->
clip_rectangle
));
tmp
->
background_pixmap
=
this
->
background_pixmap
;
return
tmp
;
}
};
class
GlowCustomColorsQt
;
...
...
xtt/lib/glow/src/glow_draw.h
View file @
7df9937e
...
...
@@ -60,6 +60,9 @@ public:
double
subwindow_scale
;
//!< Subwindow scale.
int
clip_on
=
0
;
int
clip_cnt
=
0
;
virtual
DrawWind
*
copy
()
=
0
;
virtual
void
update_buffer
(
DrawWind
*
w
)
{}
};
class
GlowDraw
{
...
...
xtt/lib/glow/src/glow_growctx.cpp
View file @
7df9937e
...
...
@@ -195,9 +195,12 @@ int GrowCtx::subw_event_handler(glow_eEvent event, int x, int y, int w, int h)
||
a
[
i
]
->
type
()
==
glow_eObjectType_GrowFolder
||
a
[
i
]
->
type
()
==
glow_eObjectType_GrowTable
)
{
switch
(
event
)
{
case
glow_eEvent_Exposure
:
if
(
a
[
i
]
->
type
()
==
glow_eObjectType_GrowWindow
)
a
[
i
]
->
event_handler
(
event
,
0
,
0
,
0
,
0
);
break
;
case
glow_eEvent_Leave
:
case
glow_eEvent_Enter
:
case
glow_eEvent_Exposure
:
case
glow_eEvent_VisibilityUnobscured
:
case
glow_eEvent_VisibilityObscured
:
break
;
...
...
xtt/lib/glow/src/glow_growwindow.cpp
View file @
7df9937e
...
...
@@ -582,6 +582,9 @@ int GrowWindow::event_handler(glow_eEvent event, int x, int y, double fx, double
int
sts
,
v_sts
,
h_sts
;
switch
(
event
)
{
case
glow_eEvent_Exposure
:
window_ctx
->
mw
->
update_buffer
(
ctx
->
mw
);
return
1
;
case
glow_eEvent_Key_Right
:
case
glow_eEvent_Key_Left
:
case
glow_eEvent_Key_Up
:
...
...
@@ -916,8 +919,8 @@ void GrowWindow::new_ctx()
=
new
GrowCtx
(
"WindowComponent"
,
ctx
->
mw
->
zoom_factor_x
*
window_scale
);
window_ctx
->
gdraw
=
ctx
->
gdraw
;
window_ctx
->
is_subwindow
=
1
;
window_ctx
->
mw
=
ctx
->
mw
;
window_ctx
->
navw
=
ctx
->
navw
;
window_ctx
->
mw
=
ctx
->
mw
->
copy
()
;
window_ctx
->
navw
=
ctx
->
navw
->
copy
()
;
window_ctx
->
userdata_save_callback
=
ctx
->
userdata_save_callback
;
window_ctx
->
userdata_open_callback
=
ctx
->
userdata_open_callback
;
window_ctx
->
userdata_copy_callback
=
ctx
->
userdata_copy_callback
;
...
...
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