Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
zathura
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
114
Issues
114
List
Boards
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pwmt
zathura
Commits
c72e02d6
Commit
c72e02d6
authored
Jan 25, 2018
by
Sebastian Ramacher
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'knuesel/feature/hidpi' into develop
parents
19645cf6
a7f42769
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
README
README
+1
-1
zathura/page-widget.c
zathura/page-widget.c
+13
-13
No files found.
README
View file @
c72e02d6
...
...
@@ -5,7 +5,7 @@ girara user interface library and several document libraries.
Requirements
------------
gtk3 (>= 3.
6
)
gtk3 (>= 3.
10
)
glib (>= 2.50)
girara (>= 0.2.8)
sqlite3 (optional, >= 3.5.9)
...
...
zathura/page-widget.c
View file @
c72e02d6
...
...
@@ -413,17 +413,17 @@ zathura_page_widget_get_property(GObject* object, guint prop_id, GValue* value,
static
zathura_device_factors_t
get_safe_device_factors
(
cairo_surface_t
*
surface
)
{
zathura_device_factors_t
factors
;
cairo_surface_get_device_scale
(
surface
,
&
factors
.
x
,
&
factors
.
y
);
zathura_device_factors_t
factors
;
cairo_surface_get_device_scale
(
surface
,
&
factors
.
x
,
&
factors
.
y
);
if
(
fabs
(
factors
.
x
)
<
DBL_EPSILON
)
{
factors
.
x
=
1
.
0
;
}
if
(
fabs
(
factors
.
y
)
<
DBL_EPSILON
)
{
factors
.
y
=
1
.
0
;
}
if
(
fabs
(
factors
.
x
)
<
DBL_EPSILON
)
{
factors
.
x
=
1
.
0
;
}
if
(
fabs
(
factors
.
y
)
<
DBL_EPSILON
)
{
factors
.
y
=
1
.
0
;
}
return
factors
;
return
factors
;
}
#else
static
zathura_device_factors_t
...
...
@@ -656,12 +656,12 @@ draw_thumbnail_image(cairo_surface_t* surface, size_t max_size)
/* note: this always returns 1 and 1 if Cairo too old for device scale API */
zathura_device_factors_t
device
=
get_safe_device_factors
(
surface
);
const
unsigned
int
u
ser
_width
=
width
/
device
.
x
;
const
unsigned
int
u
ser
_height
=
height
/
device
.
y
;
const
unsigned
int
u
nscaled
_width
=
width
/
device
.
x
;
const
unsigned
int
u
nscaled
_height
=
height
/
device
.
y
;
/* create thumbnail surface, taking width and height as
device size
s */
/* create thumbnail surface, taking width and height as
_unscaled_ device unit
s */
cairo_surface_t
*
thumbnail
;
thumbnail
=
cairo_surface_create_similar
(
surface
,
CAIRO_CONTENT_COLOR
,
u
ser_width
,
user
_height
);
thumbnail
=
cairo_surface_create_similar
(
surface
,
CAIRO_CONTENT_COLOR
,
u
nscaled_width
,
unscaled
_height
);
if
(
thumbnail
==
NULL
)
{
return
NULL
;
}
...
...
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