summaryrefslogtreecommitdiff
path: root/riscos/toolbar.c
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2004-05-14 17:35:00 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2004-05-14 17:35:00 +0000
commit020080956a59b662b410b50c884c5840db987742 (patch)
treea92be0eabdfe0ec0272f15cbd398399e1d107985 /riscos/toolbar.c
parent01586b4ab9b9d462e5f9a1c497ab4f8c8ab30450 (diff)
downloadnetsurf-020080956a59b662b410b50c884c5840db987742.tar.gz
netsurf-020080956a59b662b410b50c884c5840db987742.tar.bz2
[project @ 2004-05-14 17:35:00 by rjw]
Begone status bar widget flicker! svn path=/import/netsurf/; revision=861
Diffstat (limited to 'riscos/toolbar.c')
-rw-r--r--riscos/toolbar.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/riscos/toolbar.c b/riscos/toolbar.c
index 795d0880d..d6f3afed9 100644
--- a/riscos/toolbar.c
+++ b/riscos/toolbar.c
@@ -468,7 +468,7 @@ static void ro_toolbar_add_icon(struct toolbar *toolbar, struct toolbar_icon *ic
* \param height the new status bar height
*/
void ro_toolbar_resize_status(struct toolbar *toolbar, int height) {
- os_box extent = { 0, 0, 0, 0 };
+ os_box extent = { 0, 0, 16384, (height - 2) };
wimp_WINDOW_INFO(3) status_definition; // Barfs if 2 is used!?!?!
wimp_window *status_window;
@@ -500,13 +500,9 @@ void ro_toolbar_resize_status(struct toolbar *toolbar, int height) {
xwimp_delete_window(toolbar->status_handle);
xwimp_create_window(status_window, &toolbar->status_handle);
- /* Resize the text icon (resize icon is handled automatically
+ /* Set a big extent (it'll automatically be updated later to
+ the correct value
*/
- xwimp_resize_icon(toolbar->status_handle, ICON_STATUS_TEXT,
- 0, 0, 16384, height - 2);
- xwimp_force_redraw(toolbar->status_handle, 0, 0, 16384, height);
- extent.x1 = 16384;
- extent.y1 = height - 2;
xwimp_set_extent(toolbar->status_handle, &extent);
}
@@ -593,6 +589,11 @@ int ro_toolbar_reformat(struct toolbar *toolbar, int width) {
old_width = toolbar->status_old_width;
toolbar->status_old_width = status_width;
if (old_width != status_width) {
+ xwimp_resize_icon(toolbar->status_handle, ICON_STATUS_TEXT,
+ 0,
+ 0,
+ status_width - 12,
+ toolbar->status_height - 2);
xwimp_resize_icon(toolbar->status_handle, ICON_STATUS_RESIZE,
status_width - 12,
0,