Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
Open Virtual Carcassonne Clone
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Jonathan Michalon
Open Virtual Carcassonne Clone
Commits
68ac911f
Commit
68ac911f
authored
Mar 19, 2019
by
Colomban Wendling
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix crash in custom cell renderer size methods
parent
f15a4c40
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
clients/ovcc-gtk/src/ovccgtk-cell-renderer-color.c
clients/ovcc-gtk/src/ovccgtk-cell-renderer-color.c
+18
-2
No files found.
clients/ovcc-gtk/src/ovccgtk-cell-renderer-color.c
View file @
68ac911f
...
...
@@ -193,9 +193,17 @@ ovccgtk_cell_renderer_color_get_preferred_width (GtkCellRenderer *cell,
{
OVCCGtkCellRendererColor
*
self
=
OVCCGTK_CELL_RENDERER_COLOR
(
cell
);
gint
xpad
;
gint
width
;
gtk_cell_renderer_get_padding
(
cell
,
&
xpad
,
NULL
);
*
minimum_width
=
*
natural_width
=
xpad
*
2
+
self
->
priv
->
size
;
width
=
xpad
*
2
+
self
->
priv
->
size
;
if
(
minimum_width
)
{
*
minimum_width
=
width
;
}
if
(
natural_width
)
{
*
natural_width
=
width
;
}
}
static
void
...
...
@@ -206,9 +214,17 @@ ovccgtk_cell_renderer_color_get_preferred_height (GtkCellRenderer *cell,
{
OVCCGtkCellRendererColor
*
self
=
OVCCGTK_CELL_RENDERER_COLOR
(
cell
);
gint
ypad
;
gint
height
;
gtk_cell_renderer_get_padding
(
cell
,
NULL
,
&
ypad
);
*
minimum_height
=
*
natural_height
=
ypad
*
2
+
self
->
priv
->
size
;
height
=
ypad
*
2
+
self
->
priv
->
size
;
if
(
minimum_height
)
{
*
minimum_height
=
height
;
}
if
(
natural_height
)
{
*
natural_height
=
height
;
}
}
static
void
...
...
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