summaryrefslogtreecommitdiff
path: root/windows
diff options
context:
space:
mode:
authorVincent Sanders <vince@netsurf-browser.org>2010-02-04 21:05:44 +0000
committerVincent Sanders <vince@netsurf-browser.org>2010-02-04 21:05:44 +0000
commitc41bcf0b283b20294042f695568bbde75f31bbca (patch)
tree0f6c5912f35cb21e56555cc31060160f797c7763 /windows
parent36a21bdae479437a6ab7030f0ca6098688f02fc5 (diff)
downloadnetsurf-c41bcf0b283b20294042f695568bbde75f31bbca.tar.gz
netsurf-c41bcf0b283b20294042f695568bbde75f31bbca.tar.bz2
Cleanup toolbar usage
Fix font sizing svn path=/trunk/netsurf/; revision=9954
Diffstat (limited to 'windows')
-rw-r--r--windows/font.c47
-rw-r--r--windows/gui.c316
-rw-r--r--windows/res/back.bmpbin406 -> 0 bytes
-rw-r--r--windows/res/forward.bmpbin406 -> 0 bytes
-rw-r--r--windows/res/home.bmpbin406 -> 0 bytes
-rw-r--r--windows/res/reload.bmpbin406 -> 0 bytes
-rw-r--r--windows/res/resource.rc27
-rw-r--r--windows/res/stop.bmpbin406 -> 0 bytes
-rw-r--r--windows/res/toolbar.bmpbin0 -> 8694 bytes
-rw-r--r--windows/res/toolbarg.bmpbin0 -> 8694 bytes
-rw-r--r--windows/res/toolbarh.bmpbin0 -> 8694 bytes
-rw-r--r--windows/resourceid.h3
12 files changed, 196 insertions, 197 deletions
diff --git a/windows/font.c b/windows/font.c
index 1857652e9..246c3b713 100644
--- a/windows/font.c
+++ b/windows/font.c
@@ -31,9 +31,6 @@
#include "windows/gui.h"
#include "windows/plot.h"
-#define NSWS_FONT_SCALE_HEIGHT 1.3
-#define NSWS_FONT_SCALE_WIDTH 0.45
-
utf8_convert_ret utf8_to_font_encoding(const struct font_desc* font,
const char *string,
size_t len,
@@ -76,28 +73,32 @@ HFONT get_font(const plot_font_style_t *style)
family = FF_SWISS | DEFAULT_PITCH;
break;
}
-
- HFONT font = CreateFont((int)((((float)style->size) *
- NSWS_FONT_SCALE_HEIGHT * nsws_plot_get_scale())
- / FONT_SIZE_SCALE), /* height */
- (int)((((float)style->size) *
- NSWS_FONT_SCALE_WIDTH * nsws_plot_get_scale())
- / FONT_SIZE_SCALE), /* width */
- 0, /* escapement*/
- 0, /* orientation */
- style->weight,
- (style->flags & FONTF_ITALIC) ? TRUE : FALSE,
- FALSE, /* underline */
- FALSE, /* strike */
- DEFAULT_CHARSET, /* for locale */
- OUT_DEFAULT_PRECIS, /* general 'best match' */
- CLIP_DEFAULT_PRECIS,
- DEFAULT_QUALITY,
- family,
- face /* name of font face */
- );
+
+ int nHeight = -10;
+
+ HDC hdc = GetDC(current_hwnd);
+ nHeight = -MulDiv(style->size, GetDeviceCaps(hdc, LOGPIXELSY), 72 * FONT_SIZE_SCALE);
+ ReleaseDC(current_hwnd, hdc);
+
+ HFONT font = CreateFont(
+ nHeight, /* height */
+ 0, /* width */
+ 0, /* escapement*/
+ 0, /* orientation */
+ style->weight,
+ (style->flags & FONTF_ITALIC) ? TRUE : FALSE,
+ FALSE, /* underline */
+ FALSE, /* strike */
+ DEFAULT_CHARSET, /* for locale */
+ OUT_DEFAULT_PRECIS, /* general 'best match' */
+ CLIP_DEFAULT_PRECIS,
+ DEFAULT_QUALITY,
+ family,
+ face /* name of font face */
+ );
if (face != NULL)
free(face);
+
if (font == NULL) {
if (style->family == PLOT_FONT_FAMILY_MONOSPACE)
font = (HFONT) GetStockObject(ANSI_FIXED_FONT);
diff --git a/windows/gui.c b/windows/gui.c
index 2cb14af80..8a6697847 100644
--- a/windows/gui.c
+++ b/windows/gui.c
@@ -67,7 +67,7 @@ struct gui_window *search_current_window;
struct gui_window *window_list = NULL;
FARPROC urlproc;
-FARPROC toolproc;
+WNDPROC toolproc;
static char default_page[] = "http://www.netsurf-browser.org/welcome/";
static HICON hIcon, hIconS;
@@ -76,7 +76,6 @@ static int open_windows = 0;
static const char windowclassname_main[] = "nswsmainwindow";
static const char windowclassname_drawable[] = "nswsdrawablewindow";
-#define NTOOLBUTTONS 5
#define NSWS_THROBBER_WIDTH 24
#define NSWS_URL_ENTER (WM_USER)
@@ -99,12 +98,10 @@ struct gui_window {
struct nsws_localhistory *localhistory; /**< handle to local history window */
int width; /**< width of window */
int height; /**< height of drawing area */
- int urlbarwidth; /**< width of url bar */
- int ntoolbuttons; /**< number of toolbar buttons */
- int toolbuttondimension; /**< width, height of buttons */
+
+ int toolbuttonc; /**< number of toolbar buttons */
+ int toolbuttonsize; /**< width, height of buttons */
bool throbbing; /**< whether currently throbbing */
- TBBUTTON buttons[NTOOLBUTTONS + 1]; /* 1 = url bar */
- HBITMAP hbmp[NTOOLBUTTONS]; /**< tool button images */
struct browser_mouse *mouse; /**< mouse state */
@@ -267,66 +264,71 @@ LRESULT CALLBACK nsws_window_url_callback(HWND hwnd, UINT msg, WPARAM wparam,
return CallWindowProc((WNDPROC) urlproc, hwnd, msg, wparam, lparam);
}
-/**
- * callback for toolbar events
- */
-LRESULT CALLBACK nsws_window_toolbar_callback(HWND hwnd, UINT msg,
- WPARAM wparam, LPARAM lparam)
+/* calculate the dimensions of the url bar relative to the parent toolbar */
+static void
+urlbar_dimensions(HWND hWndParent, int toolbuttonsize, int buttonc, int *x, int *y, int *width, int *height)
{
- int x,y;
- bool match = false;
- struct gui_window *w = window_list;
- while (w != NULL) {
- if (w->toolbar == hwnd) {
- match = true;
- break;
- }
- w = w->next;
+ RECT rc;
+ const int cy_edit = 24;
+
+ GetClientRect(hWndParent, &rc);
+ *x = (toolbuttonsize + 2) * (buttonc + 1) + (NSWS_THROBBER_WIDTH>>1);
+ *y = (((rc.bottom - rc.top) + 1) - cy_edit) >> 1;
+ *width = ((rc.right - rc.left) + 1) - *x - (NSWS_THROBBER_WIDTH>>1) - NSWS_THROBBER_WIDTH;
+ *height = cy_edit;
+}
+
+/* obtain gui window structure from windows window handle */
+static struct gui_window *
+nsws_get_gui_window(HWND hwnd)
+{
+ struct gui_window *gw;
+ HWND phwnd;
+
+ gw = GetProp(hwnd, TEXT("GuiWnd"));
+
+ if (gw == NULL) {
+ /* try the parent window instead */
+ phwnd = GetParent(hwnd);
+ gw = GetProp(phwnd, TEXT("GuiWnd"));
}
- if (match == false) { /* during initial window creation */
- w = window_list;
- while (w != NULL) {
- if (w->toolbar == NULL) {
- w->toolbar = hwnd;
+ if (gw == NULL) {
+ /* unable to fetch from property, try seraching the
+ * gui window list
+ */
+ gw = window_list;
+ while (gw != NULL) {
+ if ((gw->main == hwnd) || (gw->toolbar == hwnd)) {
break;
}
- w = w->next;
+ gw = gw->next;
}
}
+ return gw;
+}
+
+/**
+ * callback for toolbar events
+ */
+LRESULT CALLBACK
+nsws_window_toolbar_callback(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
+{
+ struct gui_window *gw;
+ int urlx, urly, urlwidth, urlheight;
+
switch (msg) {
- case WM_LBUTTONUP:
- case WM_LBUTTONDOWN:
- case WM_MOUSEMOVE:
- x = GET_X_LPARAM(lparam);
- y = GET_Y_LPARAM(lparam);
- if ((w != NULL) &&
- (x > w->ntoolbuttons * w->toolbuttondimension)) {
- if (msg == WM_LBUTTONDOWN)
- SetFocus(w->urlbar);
-
- return CallWindowProc((WNDPROC)
- nsws_window_url_callback,
- w->urlbar, msg, wparam,
- MAKELONG(x - w->ntoolbuttons *
- w->toolbuttondimension, y));
- }
- break;
case WM_SIZE:
+ gw = nsws_get_gui_window(hwnd);
+ urlbar_dimensions(hwnd, gw->toolbuttonsize, gw->toolbuttonc, &urlx, &urly, &urlwidth, &urlheight);
/* resize url */
- if (w->urlbar != NULL) {
- w->urlbarwidth = LOWORD(lparam) - w->ntoolbuttons * w->toolbuttondimension - 8 - NSWS_THROBBER_WIDTH;
- MoveWindow(w->urlbar,
- w->toolbuttondimension * w->ntoolbuttons + 2,
- 8,
- w->urlbarwidth - 8,
- w->toolbuttondimension - 12,
- true);
+ if (gw->urlbar != NULL) {
+ MoveWindow(gw->urlbar, urlx, urly, urlwidth, urlheight, true);
}
/* move throbber */
- if (w->throbber != NULL) {
- MoveWindow(w->throbber,
+ if (gw->throbber != NULL) {
+ MoveWindow(gw->throbber,
LOWORD(lparam) - NSWS_THROBBER_WIDTH - 4, 8,
NSWS_THROBBER_WIDTH, NSWS_THROBBER_WIDTH,
true);
@@ -335,7 +337,8 @@ LRESULT CALLBACK nsws_window_toolbar_callback(HWND hwnd, UINT msg,
break;
}
- return CallWindowProc((WNDPROC) toolproc, hwnd, msg, wparam, lparam);
+ /* chain to the next handler */
+ return CallWindowProc(toolproc, hwnd, msg, wparam, lparam);
}
/**
@@ -512,26 +515,6 @@ static void nsws_window_set_ico(struct gui_window *w)
SendMessage(w->main, WM_SETICON, ICON_SMALL, (LPARAM)hIconS);
}
-/**
- * creation of url bar
- */
-static void nsws_window_urlbar_create(struct gui_window *w)
-{
- HWND hwnd = CreateWindow("EDIT",
- "",
- WS_CHILD | WS_VISIBLE | ES_AUTOHSCROLL | ES_OEMCONVERT,
- w->toolbuttondimension * w->ntoolbuttons + 2,
- 8,
- w->urlbarwidth - 8,
- w->toolbuttondimension - 12,
- w->main,
- (HMENU) NSWS_ID_URLBAR,
- hinstance,
- NULL);
- /*urlproc = (FARPROC) SetWindowLong(hwnd, GWL_WNDPROC, (DWORD)
- nsws_window_url_callback);*/
- w->urlbar = hwnd;
-}
/**
* creation of throbber
@@ -564,80 +547,83 @@ static void nsws_window_throbber_create(struct gui_window *w)
w->throbber = hwnd;
}
-/**
- * creation of toolbar
- */
-static void
-nsws_window_toolbar_create(struct gui_window *w)
-{
- unsigned int listid = 0;
- char imagepath[PATH_MAX];
- /* NB there is currently an immediate window close at
- * netsurf launch in real/virtual - as distinct from
- * emulation - windows whose probable cause is the
- * location of the url bar to the right of the buttons;
- * really the way forward would quite possibly be to
- * implement an active bitmap as the button bar, sensitive
- * to hover / click events; the immediate window close
- * behaviour was observed during development when testing
- * the arrangements of url bar / buttons although much has
- * changed since then */
-
- HWND hwnd = CreateWindow(TOOLBARCLASSNAME,
- NULL,
- WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | TBSTYLE_FLAT,
- 0, 0, w->width,
- w->toolbuttondimension + 8, w->main,
- (HMENU) NSWS_ID_TOOLBAR, hinstance, NULL);
- HIMAGELIST hImageList = ImageList_Create(w->toolbuttondimension - 8,
- w->toolbuttondimension - 8,
- 0,
- w->ntoolbuttons,
- 0);
- SendMessage(hwnd, TB_BUTTONSTRUCTSIZE, (WPARAM) sizeof(TBBUTTON), 0);
-
- ZeroMemory(w->buttons, sizeof(w->buttons));
-
- w->buttons[5].iBitmap = w->urlbarwidth;
- w->buttons[5].fsStyle = TBSTYLE_SEP;
- w->buttons[5].iString = -1;
-/* w->buttons[0].fsState = TBSTATE_ENABLED; */
-
-/* keep bitmaps in cache memory for re-creation of toolbar */
-
-#define MAKE_BUTTON(p, q, r) \
- if (w->hbmp[p] == NULL) { \
- nsws_find_resource(imagepath, #r ".bmp", "windows/res/" \
- #r ".bmp"); \
- LOG(("loading toolbutton image %s", imagepath)); \
- w->hbmp[p] = LoadImage(NULL, imagepath, IMAGE_BITMAP, \
- w->toolbuttondimension - 8, \
- w->toolbuttondimension - 8, LR_SHARED | \
- LR_LOADFROMFILE | LR_LOADTRANSPARENT); \
- } \
- ImageList_Add(hImageList, w->hbmp[p], NULL); \
- w->buttons[p].iBitmap = MAKELONG(p, 0); \
- w->buttons[p].idCommand = NSWS_ID_NAV_##q; \
- w->buttons[p].fsState = TBSTATE_ENABLED; \
- w->buttons[p].fsStyle = TBSTYLE_BUTTON
- MAKE_BUTTON(0, BACK, back);
- MAKE_BUTTON(1, FORWARD, forward);
- MAKE_BUTTON(2, HOME, home);
- MAKE_BUTTON(3, STOP, stop);
- MAKE_BUTTON(4, RELOAD, reload);
-#undef MAKE_BUTTON
- SendMessage(hwnd, TB_SETIMAGELIST, (WPARAM) listid, (LPARAM)
- hImageList);
- SendMessage(hwnd, TB_ADDBUTTONS, w->ntoolbuttons + 1,
- (LPARAM) &(w->buttons));
- w->toolbar = hwnd;
- DeleteObject(hImageList);
- nsws_window_urlbar_create(w);
- nsws_window_throbber_create(w);
- SendMessage(hwnd, WM_SIZE, 0,
- MAKELONG(w->width, w->toolbuttondimension + 12));
- toolproc = (FARPROC) SetWindowLong(hwnd, GWL_WNDPROC, (DWORD)
- nsws_window_toolbar_callback);
+
+static HWND
+nsws_window_toolbar_create(struct gui_window *gw, HWND hWndParent)
+{
+ HWND hWndToolbar;
+ HIMAGELIST hImageList;
+ HIMAGELIST hDisabledImageList;
+ HIMAGELIST hHotImageList;
+ /* Toolbar buttons */
+ TBBUTTON tbButtons[] = {
+ {0, NSWS_ID_NAV_BACK, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0},
+ {1, NSWS_ID_NAV_FORWARD, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0},
+ {2, NSWS_ID_NAV_HOME, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0},
+ {3, NSWS_ID_NAV_RELOAD, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0},
+ {4, NSWS_ID_NAV_STOP, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0},
+ };
+
+ /* Create the toolbar child window. */
+ hWndToolbar = CreateWindowEx(0, TOOLBARCLASSNAME, "Toolbar",
+ WS_CHILD | WS_VISIBLE | TBSTYLE_FLAT,
+ 0, 0, 0, 0,
+ hWndParent, NULL, HINST_COMMCTRL, NULL);
+
+ if (!hWndToolbar) {
+ return NULL;
+ }
+
+ /* remember how many buttons are being created */
+ gw->toolbuttonc = sizeof(tbButtons) / sizeof(TBBUTTON);
+
+ /* Create the standard image list and assign to toolbar. */
+ hImageList = ImageList_LoadImage(hinstance, MAKEINTRESOURCE(NSWS_ID_TOOLBAR_BITMAP), gw->toolbuttonsize, 0, CLR_DEFAULT, IMAGE_BITMAP, 0);
+ SendMessage(hWndToolbar, TB_SETIMAGELIST, (WPARAM)0, (LPARAM)hImageList);
+
+ /* Create the disabled image list and assign to toolbar. */
+ hDisabledImageList = ImageList_LoadImage(hinstance, MAKEINTRESOURCE(NSWS_ID_TOOLBAR_GREY_BITMAP), gw->toolbuttonsize, 0, CLR_DEFAULT, IMAGE_BITMAP, 0);
+ SendMessage(hWndToolbar, TB_SETDISABLEDIMAGELIST, (WPARAM)1, (LPARAM)hDisabledImageList);
+
+ /* Create the hot image list and assign to toolbar. */
+ hHotImageList = ImageList_LoadImage(hinstance, MAKEINTRESOURCE(NSWS_ID_TOOLBAR_HIGHL_BITMAP), gw->toolbuttonsize, 0, CLR_DEFAULT, IMAGE_BITMAP, 0);
+ SendMessage(hWndToolbar, TB_SETHOTIMAGELIST, (WPARAM)2, (LPARAM)hHotImageList);
+
+ /* Add buttons. */
+ SendMessage(hWndToolbar, TB_BUTTONSTRUCTSIZE, (WPARAM)sizeof(TBBUTTON), 0);
+ SendMessage(hWndToolbar, TB_ADDBUTTONS, (WPARAM)gw->toolbuttonc, (LPARAM)&tbButtons);
+
+
+ int urlx, urly, urlwidth, urlheight;
+ urlbar_dimensions(hWndToolbar, gw->toolbuttonsize, gw->toolbuttonc, &urlx, &urly, &urlwidth, &urlheight);
+
+ // Create the edit control child window.
+ gw->urlbar = CreateWindowEx(0L, "Edit", NULL,
+ WS_CHILD | WS_BORDER | WS_VISIBLE | ES_LEFT
+ | ES_AUTOVSCROLL | ES_MULTILINE,
+ urlx,
+ urly,
+ urlwidth,
+ urlheight,
+ hWndToolbar,
+ (HMENU)NSWS_ID_URLBAR,
+ hinstance, 0 );
+
+ if (!gw->urlbar) {
+ DestroyWindow(hWndToolbar);
+ return NULL;
+ }
+
+ nsws_window_throbber_create(gw);
+
+ /* set the gui window associated with this toolbar */
+ SetProp(hWndToolbar, TEXT("GuiWnd"), (HANDLE)gw);
+
+ /* subclass the message handler */
+ toolproc = (WNDPROC)SetWindowLongPtr(hWndToolbar, GWLP_WNDPROC, (LONG_PTR)nsws_window_toolbar_callback);
+
+ /* Return the completed toolbar */
+ return hWndToolbar;
}
/**
@@ -654,15 +640,19 @@ static void nsws_window_statusbar_create(struct gui_window *w)
static void nsws_window_drawingarea_create(struct gui_window *w)
{
- /* potentially make drawingarea window from frameless window
- + scrollbars here */
+ RECT rtoolbar;
+ RECT rstatusbar;
+
+ GetClientRect(w->toolbar, &rtoolbar);
+ GetClientRect(w->statusbar, &rstatusbar);
+
w->drawingarea = CreateWindow(windowclassname_drawable,
NULL,
WS_VISIBLE|WS_CHILD,
0,
- w->toolbuttondimension + 8,
+ rtoolbar.bottom + 1,
w->width,
- w->height - (w->toolbuttondimension + 8),
+ rstatusbar.top - rtoolbar.bottom,
w->main,
NULL,
hinstance,
@@ -1490,13 +1480,6 @@ LRESULT CALLBACK nsws_window_event_callback(HWND hwnd, UINT msg, WPARAM wparam,
nscss_screen_dpi = INTTOFIX(dpi);
ReleaseDC(hwnd, hdc);
- nsws_window_set_accels(w);
- nsws_window_set_ico(w);
- nsws_window_toolbar_create(w);
- nsws_window_statusbar_create(w);
- nsws_window_vscroll_create(w);
- nsws_window_hscroll_create(w);
- nsws_window_drawingarea_create(w);
break;
}
@@ -1600,6 +1583,14 @@ static void nsws_window_create(struct gui_window *gw)
option_window_y, option_window_width,
option_window_height, SWP_SHOWWINDOW);
+ nsws_window_set_accels(gw);
+ nsws_window_set_ico(gw);
+ gw->toolbar = nsws_window_toolbar_create(gw, hwnd);
+ nsws_window_statusbar_create(gw);
+ nsws_window_vscroll_create(gw);
+ nsws_window_hscroll_create(gw);
+ nsws_window_drawingarea_create(gw);
+
ShowWindow(hwnd, SW_SHOWNORMAL);
UpdateWindow(hwnd);
gw->main = hwnd;
@@ -1626,10 +1617,7 @@ gui_create_browser_window(struct browser_window *bw,
w->width = 600;
w->height = 600;
- w->ntoolbuttons = NTOOLBUTTONS;
- w->toolbuttondimension = 32; /* includes padding of 4 every side */
- w->urlbarwidth = w->width - w->toolbuttondimension * w->ntoolbuttons
- - 8 - NSWS_THROBBER_WIDTH;
+ w->toolbuttonsize = 24; /* includes padding of 4 every side */
w->requestscrollx = 0;
w->requestscrolly = 0;
w->localhistory = NULL;
diff --git a/windows/res/back.bmp b/windows/res/back.bmp
deleted file mode 100644
index c0088c9e8..000000000
--- a/windows/res/back.bmp
+++ /dev/null
Binary files differ
diff --git a/windows/res/forward.bmp b/windows/res/forward.bmp
deleted file mode 100644
index e9ff4079c..000000000
--- a/windows/res/forward.bmp
+++ /dev/null
Binary files differ
diff --git a/windows/res/home.bmp b/windows/res/home.bmp
deleted file mode 100644
index 80bddfd84..000000000
--- a/windows/res/home.bmp
+++ /dev/null
Binary files differ
diff --git a/windows/res/reload.bmp b/windows/res/reload.bmp
deleted file mode 100644
index 0809a6763..000000000
--- a/windows/res/reload.bmp
+++ /dev/null
Binary files differ
diff --git a/windows/res/resource.rc b/windows/res/resource.rc
index 5e9f4a285..8c09f133b 100644
--- a/windows/res/resource.rc
+++ b/windows/res/resource.rc
@@ -10,9 +10,21 @@
//
+// Bitmap resources
+//
+NSWS_ID_TOOLBAR_BITMAP BITMAP "toolbar.bmp"
+
+
+NSWS_ID_TOOLBAR_GREY_BITMAP BITMAP "toolbarg.bmp"
+
+
+NSWS_ID_TOOLBAR_HIGHL_BITMAP BITMAP "toolbarh.bmp"
+
+
+
+//
// Menu resources
//
-//LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
NSWS_ID_CTXMENU MENU
{
POPUP "Context"
@@ -32,7 +44,6 @@ NSWS_ID_CTXMENU MENU
-//LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
NSWS_ID_MAINMENU MENU
{
POPUP "&File"
@@ -118,20 +129,18 @@ NSWS_ID_MAINMENU MENU
//
// Dialog resources
//
-//LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
-NSWS_ID_ABOUT_DIALOG DIALOG 0, 0, 400, 400
+NSWS_ID_ABOUT_DIALOG DIALOG 0, 0, 400, 350
STYLE DS_MODALFRAME | DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU
CAPTION "About NetSurf"
FONT 8, "MS Sans Serif"
{
- DEFPUSHBUTTON "&OK", IDOK, 350, 365, 30, 20
- GROUPBOX "About NetSurf", IDC_STATIC, 10, 10, 380, 380
- CTEXT "content", NSWS_ID_ABOUT_CONTENT, 20, 20, 350, 330, SS_CENTER
+ DEFPUSHBUTTON "&OK", IDOK, 345, 317, 41, 16
+ GROUPBOX "About NetSurf", IDC_STATIC, 10, 10, 380, 328
+ CTEXT "content", NSWS_ID_ABOUT_CONTENT, 20, 20, 361, 292, SS_CENTER
}
-//LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
NSWS_ID_DOWNLOAD_DIALOG DIALOG 0, 0, 200, 100
STYLE DS_MODALFRAME | DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU
CAPTION "download"
@@ -145,7 +154,6 @@ FONT 8, "MS Sans Serif"
-//LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
NSWS_ID_PREFS_DIALOG DIALOG 0, 0, 388, 205
STYLE DS_MODALFRAME | DS_SETFONT | WS_BORDER | WS_CAPTION | WS_DLGFRAME | WS_POPUP | WS_SYSMENU
CAPTION "Edit preferences"
@@ -213,5 +221,4 @@ FONT 8, "MS Sans Serif"
//
// Icon resources
//
-//LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_UK
ID ICON "NetSurf32.ico"
diff --git a/windows/res/stop.bmp b/windows/res/stop.bmp
deleted file mode 100644
index 01ae930a1..000000000
--- a/windows/res/stop.bmp
+++ /dev/null
Binary files differ
diff --git a/windows/res/toolbar.bmp b/windows/res/toolbar.bmp
new file mode 100644
index 000000000..4087878a6
--- /dev/null
+++ b/windows/res/toolbar.bmp
Binary files differ
diff --git a/windows/res/toolbarg.bmp b/windows/res/toolbarg.bmp
new file mode 100644
index 000000000..9a59e8d43
--- /dev/null
+++ b/windows/res/toolbarg.bmp
Binary files differ
diff --git a/windows/res/toolbarh.bmp b/windows/res/toolbarh.bmp
new file mode 100644
index 000000000..81e666f03
--- /dev/null
+++ b/windows/res/toolbarh.bmp
Binary files differ
diff --git a/windows/resourceid.h b/windows/resourceid.h
index 73fedebc5..e5b6f8625 100644
--- a/windows/resourceid.h
+++ b/windows/resourceid.h
@@ -25,6 +25,9 @@
#define NSWS_ID_MAINMENU 101
#define NSWS_ID_CTXMENU 103
+#define NSWS_ID_TOOLBAR_BITMAP 107
+#define NSWS_ID_TOOLBAR_GREY_BITMAP 108
+#define NSWS_ID_TOOLBAR_HIGHL_BITMAP 109
#define NSWS_ID_ABOUT_DIALOG 11111
#define NSWS_ID_ABOUT_CONTENT 11112
#define NSWS_ID_PREFS_DIALOG 11113