mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-28 12:24:18 +03:00
[project @ 2004-05-05 20:04:37 by rjw]
Status window now correctly respects the horizontal scroll bar height. svn path=/import/netsurf/; revision=829
This commit is contained in:
parent
bb41604045
commit
c4fe8ccf18
@ -460,6 +460,8 @@ static void ro_toolbar_add_icon(struct toolbar *toolbar, struct toolbar_icon *ic
|
||||
*/
|
||||
void ro_toolbar_resize_status(struct toolbar *toolbar, int height) {
|
||||
os_box extent = { 0, 0, 0, 0 };
|
||||
wimp_WINDOW_INFO(3) status_definition; // Barfs if 2 is used!?!?!
|
||||
wimp_window *status_window;
|
||||
|
||||
/* Paranoia
|
||||
*/
|
||||
@ -467,8 +469,30 @@ void ro_toolbar_resize_status(struct toolbar *toolbar, int height) {
|
||||
|
||||
/* Check if we need to update
|
||||
*/
|
||||
if (toolbar->status_height != height) {
|
||||
if (toolbar->status_height == height) return;
|
||||
toolbar->status_height = height;
|
||||
|
||||
/* Get the window info
|
||||
*/
|
||||
status_definition.w = toolbar->status_handle;
|
||||
if (xwimp_get_window_info((wimp_window_info *)&status_definition)) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Modify the window
|
||||
*/
|
||||
status_window = (wimp_window *)((char *)(&status_definition) + 4);
|
||||
status_window->ymin = height - 2;
|
||||
status_window->visible.y1 = height - 2;
|
||||
status_window->extent.y1 = height - 2;
|
||||
|
||||
/* Recreate the window
|
||||
*/
|
||||
xwimp_delete_window(toolbar->status_handle);
|
||||
xwimp_create_window(status_window, &toolbar->status_handle);
|
||||
|
||||
/* Resize the text icon (resize icon is handled automatically
|
||||
*/
|
||||
xwimp_resize_icon(toolbar->status_handle, ICON_STATUS_TEXT,
|
||||
0, 0, 16384, height - 2);
|
||||
xwimp_force_redraw(toolbar->status_handle, 0, 0, 16384, height);
|
||||
@ -476,7 +500,6 @@ void ro_toolbar_resize_status(struct toolbar *toolbar, int height) {
|
||||
extent.y1 = height - 2;
|
||||
xwimp_set_extent(toolbar->status_handle, &extent);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@ -662,7 +685,7 @@ int ro_toolbar_update(struct toolbar *toolbar) {
|
||||
*/
|
||||
if (!xwimp_get_caret_position(&caret)) {
|
||||
if ((caret.w == toolbar->toolbar_handle) && (caret.i == ICON_TOOLBAR_URL)) {
|
||||
xwimp_set_caret_position(-1, 0, 0, 0, 0, 0);
|
||||
xwimp_set_caret_position((wimp_w)-1, 0, 0, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
xwimp_resize_icon(toolbar->toolbar_handle, ICON_TOOLBAR_URL,
|
||||
|
Loading…
x
Reference in New Issue
Block a user