mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-11-24 07:19:37 +03:00
[project @ 2004-06-30 17:59:18 by rjw]
Minor window extent bugfixes svn path=/import/netsurf/; revision=1032
This commit is contained in:
parent
fece5a0287
commit
146a529ac0
@ -420,9 +420,12 @@ void ro_gui_hotlist_update_entry_size(struct hotlist_entry *entry) {
|
||||
xwimptextop_string_width(entry->url,
|
||||
strlen(entry->url) > 256 ? 256 : strlen(entry->url),
|
||||
&width);
|
||||
width += 32 + 36 + 8;
|
||||
if (width < entry->collapsed_width) width = entry->collapsed_width;
|
||||
entry->expanded_width = width;
|
||||
} else {
|
||||
entry->expanded_width = width + 32 + 36 + 8;
|
||||
}
|
||||
entry->expanded_width = width + 32 + 36 + 8;
|
||||
|
||||
/* All entries are 44 units high
|
||||
*/
|
||||
@ -434,6 +437,7 @@ void ro_gui_hotlist_update_entry_size(struct hotlist_entry *entry) {
|
||||
* Redraws a section of the hotlist window
|
||||
*/
|
||||
void ro_gui_hotlist_redraw(wimp_draw *redraw) {
|
||||
wimp_window_state state;
|
||||
osbool more;
|
||||
unsigned int size;
|
||||
os_box extent = {0, 0, 0, 0};;
|
||||
@ -485,6 +489,9 @@ void ro_gui_hotlist_redraw(wimp_draw *redraw) {
|
||||
extent.x1 = max_width;
|
||||
extent.y0 = max_height;
|
||||
xwimp_set_extent(hotlist_window, &extent);
|
||||
state.w = hotlist_window;
|
||||
wimp_get_window_state(&state);
|
||||
wimp_open_window((wimp_open *) &state);
|
||||
reformat_pending = false;
|
||||
}
|
||||
}
|
||||
@ -513,10 +520,6 @@ int ro_gui_hotlist_redraw_tree(struct hotlist_entry *entry, int level, int x0, i
|
||||
} else {
|
||||
entry->width = entry->collapsed_width;
|
||||
}
|
||||
if ((x0 + entry->width) > (max_width + origin_x))
|
||||
max_width = x0 + entry->width - origin_x;
|
||||
if ((y0 - 44) < (max_height + origin_y))
|
||||
max_height = y0 - 44 - origin_y;
|
||||
|
||||
/* Redraw the item
|
||||
*/
|
||||
@ -524,6 +527,13 @@ int ro_gui_hotlist_redraw_tree(struct hotlist_entry *entry, int level, int x0, i
|
||||
box_y0 = y0;
|
||||
cumulative += height;
|
||||
|
||||
/* Get the maximum extents
|
||||
*/
|
||||
if ((x0 + entry->width) > (max_width + origin_x))
|
||||
max_width = x0 + entry->width - origin_x;
|
||||
if ((y0 - height) < (max_height + origin_y))
|
||||
max_height = y0 - height - origin_y;
|
||||
|
||||
/* Draw the vertical links
|
||||
*/
|
||||
if (entry->next_entry) {
|
||||
@ -715,6 +725,7 @@ void ro_gui_hotlist_click(wimp_pointer *pointer) {
|
||||
x_offset = x - entry->x0;
|
||||
if ((x_offset < 32) || (buttons == wimp_DOUBLE_SELECT)) {
|
||||
entry->expanded = !entry->expanded;
|
||||
reformat_pending = true;
|
||||
xwimp_force_redraw(hotlist_window, 0, -16384, 16384, 0);
|
||||
} else {
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user