summaryrefslogtreecommitdiff
path: root/riscos/theme.c
diff options
context:
space:
mode:
authorRichard Wilson <rjw@netsurf-browser.org>2006-09-06 22:15:58 +0000
committerRichard Wilson <rjw@netsurf-browser.org>2006-09-06 22:15:58 +0000
commit3e0c02e8e59fe41a250d54b760b0cd675044697f (patch)
tree3265bb4c158ee96f7cbee0420692d234f3a9ca32 /riscos/theme.c
parentd5540f344d5048ce06ef86fa9072fbf38a260a48 (diff)
downloadnetsurf-3e0c02e8e59fe41a250d54b760b0cd675044697f.tar.gz
netsurf-3e0c02e8e59fe41a250d54b760b0cd675044697f.tar.bz2
Simplify and tidy up RISC OS gui_ functions. Fix toolbar height changing issues for framesets.
svn path=/trunk/netsurf/; revision=2924
Diffstat (limited to 'riscos/theme.c')
-rw-r--r--riscos/theme.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/riscos/theme.c b/riscos/theme.c
index 53aee65e9..24cf3e3e3 100644
--- a/riscos/theme.c
+++ b/riscos/theme.c
@@ -568,6 +568,9 @@ bool ro_gui_theme_apply(struct theme_descriptor *descriptor) {
/* apply the theme to all the current windows */
ro_gui_window_update_theme();
+ ro_gui_tree_update_theme(hotlist_tree);
+ ro_gui_tree_update_theme(global_history_tree);
+ ro_gui_tree_update_theme(cookies_tree);
ro_gui_theme_close(theme_previous, false);
return true;
}
@@ -833,6 +836,7 @@ struct toolbar *ro_gui_theme_create_toolbar(struct theme_descriptor *descriptor,
ro_gui_theme_destroy_toolbar(toolbar);
return NULL;
}
+ toolbar->old_height = ro_gui_theme_toolbar_full_height(toolbar);
return toolbar;
}
@@ -1751,7 +1755,6 @@ void ro_gui_theme_destroy_toolbar(struct toolbar *toolbar) {
* \param toolbar the toolbar to toggle editing for
*/
void ro_gui_theme_toggle_edit(struct toolbar *toolbar) {
- int height;
int icons = 0;
struct toolbar_icon *icon;
struct gui_window *g = NULL;
@@ -1812,14 +1815,13 @@ void ro_gui_theme_toggle_edit(struct toolbar *toolbar) {
}
/* turn off editing */
- height = toolbar->editor->height;
ro_gui_theme_destroy_toolbar(toolbar->editor);
toolbar->editor = NULL;
ro_gui_theme_update_toolbar(toolbar->descriptor, toolbar);
switch (toolbar->type) {
case THEME_BROWSER_TOOLBAR:
if (g)
- ro_gui_window_update_dimensions(g, height);
+ gui_window_update_extent(g);
break;
default:
if (toolbar->parent_handle)
@@ -1863,8 +1865,7 @@ void ro_gui_theme_toggle_edit(struct toolbar *toolbar) {
switch (toolbar->type) {
case THEME_BROWSER_TOOLBAR:
if (g)
- ro_gui_window_update_dimensions(g,
- -toolbar->editor->height);
+ gui_window_update_extent(g);
break;
default:
if (toolbar->parent_handle) {
@@ -2426,3 +2427,12 @@ void ro_gui_theme_status_open(wimp_open *open) {
if (toolbar->status_width > 10000) toolbar->status_width = 10000;
ro_gui_theme_process_toolbar(toolbar, -1);
}
+
+int ro_gui_theme_height_change(struct toolbar *toolbar) {
+ int height, cur_height;
+
+ cur_height = ro_gui_theme_toolbar_full_height(toolbar);
+ height = toolbar->old_height - cur_height;
+ toolbar->old_height = cur_height;
+ return height;
+}