Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC Browser Plugins
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
VideoLAN
VLC Browser Plugins
Commits
19fc7787
Commit
19fc7787
authored
Jan 03, 2012
by
Cheng Sun
Committed by
Jean-Baptiste Kempf
Jan 05, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GTK: VLC cone icon scaling if window too small
Signed-off-by:
Jean-Baptiste Kempf
<
jb@videolan.org
>
parent
0fd627d1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
npapi/vlcplugin_gtk.cpp
npapi/vlcplugin_gtk.cpp
+10
-0
No files found.
npapi/vlcplugin_gtk.cpp
View file @
19fc7787
...
...
@@ -269,6 +269,16 @@ static bool video_expose_handler(GtkWidget *widget, GdkEvent *event, gpointer us
winheight
=
gdk_window_get_height
(
window
),
iconwidth
=
gdk_pixbuf_get_width
(
cone_icon
),
iconheight
=
gdk_pixbuf_get_height
(
cone_icon
);
double
widthratio
=
(
double
)
winwidth
/
iconwidth
,
heightratio
=
(
double
)
winheight
/
iconheight
;
double
sizeratio
=
widthratio
<
heightratio
?
widthratio
:
heightratio
;
if
(
sizeratio
<
1.0
)
{
cone_icon
=
gdk_pixbuf_scale_simple
(
cone_icon
,
iconwidth
*
sizeratio
,
iconheight
*
sizeratio
,
GDK_INTERP_BILINEAR
);
if
(
!
cone_icon
)
return
false
;
iconwidth
=
gdk_pixbuf_get_width
(
cone_icon
);
iconheight
=
gdk_pixbuf_get_height
(
cone_icon
);
}
cairo_t
*
cr
=
gdk_cairo_create
(
window
);
gdk_cairo_set_source_pixbuf
(
cr
,
cone_icon
,
(
winwidth
-
iconwidth
)
/
2.0
,
(
winheight
-
iconheight
)
/
2.0
);
...
...
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