Gitweb links:
...log
http://git.netsurf-browser.org/netsurf.git/shortlog/b58825dcf75473a5ce13b7f405a8ca3c598fd1cc
...commit
http://git.netsurf-browser.org/netsurf.git/commit/b58825dcf75473a5ce13b7f405a8ca3c598fd1cc
...tree
http://git.netsurf-browser.org/netsurf.git/tree/b58825dcf75473a5ce13b7f405a8ca3c598fd1cc
The branch, master has been updated
via b58825dcf75473a5ce13b7f405a8ca3c598fd1cc (commit)
from d3a051872613eed7bac451642d8b302c963c57f0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/netsurf.git/commitdiff/b58825dcf75473a5ce13b7f405a8ca3c598fd1cc
commit b58825dcf75473a5ce13b7f405a8ca3c598fd1cc
Author: Ole Loots <[email protected]>
Commit: Ole Loots <[email protected]>
Center favicon, don't stretch.
diff --git a/atari/browser_win.c b/atari/browser_win.c
index 9887083..29e78ca 100755
--- a/atari/browser_win.c
+++ b/atari/browser_win.c
@@ -481,14 +481,17 @@ static void __CDECL evnt_window_iconify( WINDOW *win,
short buff[8], void * data
input_window = NULL;
}
}
-
+
+/**
+ * Redraw the favicon
+*/
static void __CDECL evnt_window_icondraw( WINDOW *win, short buff[8], void *
data )
{
short x,y,w,h;
struct gui_window * gw = (struct gui_window*)data;
WindClear( win);
- WindGet( win, WF_WORKXYWH, &x, &y, &w, &h);
+ WindGet( win, WF_WORKXYWH, &x, &y, &w, &h);
if( gw->icon == NULL ) {
OBJECT * tree;
RsrcGaddr( h_gem_rsrc, R_TREE, ICONIFY , &tree );
@@ -497,9 +500,14 @@ static void __CDECL evnt_window_icondraw( WINDOW *win,
short buff[8], void * dat
tree->ob_width = w;
tree->ob_height = h;
mt_objc_draw( tree, 0, 8, buff[4], buff[5], buff[6], buff[7],
app.aes_global );
- } else {
- struct rect clip = { 0,0,w,h };
- plot_set_dimensions( x,y,w,h );
+ } else {
+ struct rect clip = { 0,0,w,h };
+ int xoff=0;
+ if (w > h) {
+ xoff = ((w-h)/2);
+ w = h;
+ }
+ plot_set_dimensions( x+xoff,y,w,h );
plot_clip(&clip);
atari_plotters.bitmap(0, 0, w, h, gw->icon, 0xffffff, 0);
}
-----------------------------------------------------------------------
Summary of changes:
atari/browser_win.c | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/atari/browser_win.c b/atari/browser_win.c
index 9887083..29e78ca 100755
--- a/atari/browser_win.c
+++ b/atari/browser_win.c
@@ -481,14 +481,17 @@ static void __CDECL evnt_window_iconify( WINDOW *win,
short buff[8], void * data
input_window = NULL;
}
}
-
+
+/**
+ * Redraw the favicon
+*/
static void __CDECL evnt_window_icondraw( WINDOW *win, short buff[8], void *
data )
{
short x,y,w,h;
struct gui_window * gw = (struct gui_window*)data;
WindClear( win);
- WindGet( win, WF_WORKXYWH, &x, &y, &w, &h);
+ WindGet( win, WF_WORKXYWH, &x, &y, &w, &h);
if( gw->icon == NULL ) {
OBJECT * tree;
RsrcGaddr( h_gem_rsrc, R_TREE, ICONIFY , &tree );
@@ -497,9 +500,14 @@ static void __CDECL evnt_window_icondraw( WINDOW *win,
short buff[8], void * dat
tree->ob_width = w;
tree->ob_height = h;
mt_objc_draw( tree, 0, 8, buff[4], buff[5], buff[6], buff[7],
app.aes_global );
- } else {
- struct rect clip = { 0,0,w,h };
- plot_set_dimensions( x,y,w,h );
+ } else {
+ struct rect clip = { 0,0,w,h };
+ int xoff=0;
+ if (w > h) {
+ xoff = ((w-h)/2);
+ w = h;
+ }
+ plot_set_dimensions( x+xoff,y,w,h );
plot_clip(&clip);
atari_plotters.bitmap(0, 0, w, h, gw->icon, 0xffffff, 0);
}
--
NetSurf Browser
_______________________________________________
netsurf-commits mailing list
[email protected]
http://vlists.pepperfish.net/cgi-bin/mailman/listinfo/netsurf-commits-netsurf-browser.org