mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-14 13:34:31 +03:00
[project @ 2005-03-20 20:39:43 by rjw]
Allow theme changing during toolbar edit sessions. Stop pointer changing to ptr_lr when updating toolbar windows. svn path=/import/netsurf/; revision=1558
This commit is contained in:
parent
062e6a5bae
commit
412c668af3
@ -58,7 +58,7 @@ static struct toolbar_icon *ro_gui_theme_toolbar_get_insert_icon(struct toolbar
|
||||
/* A basic window for the toolbar and status
|
||||
*/
|
||||
static wimp_window theme_toolbar_window = {
|
||||
{0, 0, 16384, 16384},
|
||||
{0, 0, 1, 1},
|
||||
0,
|
||||
0,
|
||||
wimp_TOP,
|
||||
@ -72,7 +72,7 @@ static wimp_window theme_toolbar_window = {
|
||||
wimp_COLOUR_MID_LIGHT_GREY,
|
||||
wimp_COLOUR_CREAM,
|
||||
wimp_WINDOW_NEVER3D | 0x16u /* RISC OS 5.03+ - greyed icons detected for interactive help */,
|
||||
{0, 0, 16384, 16384},
|
||||
{0, 0, 1, 1},
|
||||
0,
|
||||
0,
|
||||
wimpspriteop_AREA,
|
||||
|
@ -883,6 +883,9 @@ void ro_gui_window_update_theme(void) {
|
||||
for (g = window_list; g; g = g->next) {
|
||||
if (g->toolbar) {
|
||||
height = ro_gui_theme_toolbar_height(g->toolbar);
|
||||
if (g->toolbar->editor)
|
||||
if (!ro_gui_theme_update_toolbar(NULL, g->toolbar->editor))
|
||||
g->toolbar->editor = NULL;
|
||||
if (!ro_gui_theme_update_toolbar(NULL, g->toolbar)) {
|
||||
ro_gui_theme_destroy_toolbar(g->toolbar);
|
||||
g->toolbar = NULL;
|
||||
@ -893,23 +896,33 @@ void ro_gui_window_update_theme(void) {
|
||||
ro_gui_window_update_dimensions(g, height -
|
||||
ro_gui_theme_toolbar_height(g->toolbar));
|
||||
}
|
||||
ro_gui_theme_toolbar_editor_sync(g->toolbar);
|
||||
}
|
||||
}
|
||||
if ((hotlist_tree) && (hotlist_tree->toolbar)) {
|
||||
if (hotlist_tree->toolbar->editor)
|
||||
if (!ro_gui_theme_update_toolbar(NULL, hotlist_tree->toolbar->editor))
|
||||
hotlist_tree->toolbar->editor = NULL;
|
||||
if (!ro_gui_theme_update_toolbar(NULL, hotlist_tree->toolbar)) {
|
||||
ro_gui_theme_destroy_toolbar(hotlist_tree->toolbar);
|
||||
hotlist_tree->toolbar = NULL;
|
||||
}
|
||||
ro_gui_theme_toolbar_editor_sync(hotlist_tree->toolbar);
|
||||
ro_gui_theme_attach_toolbar(hotlist_tree->toolbar,
|
||||
(wimp_w)hotlist_tree->handle);
|
||||
xwimp_force_redraw((wimp_w)hotlist_tree->handle,
|
||||
0, -16384, 16384, 16384);
|
||||
}
|
||||
if ((global_history_tree) && (global_history_tree->toolbar)) {
|
||||
if (global_history_tree->toolbar->editor)
|
||||
if (!ro_gui_theme_update_toolbar(NULL,
|
||||
global_history_tree->toolbar->editor))
|
||||
global_history_tree->toolbar->editor = NULL;
|
||||
if (!ro_gui_theme_update_toolbar(NULL, global_history_tree->toolbar)) {
|
||||
ro_gui_theme_destroy_toolbar(global_history_tree->toolbar);
|
||||
global_history_tree->toolbar = NULL;
|
||||
}
|
||||
ro_gui_theme_toolbar_editor_sync(global_history_tree->toolbar);
|
||||
ro_gui_theme_attach_toolbar(global_history_tree->toolbar,
|
||||
(wimp_w)global_history_tree->handle);
|
||||
xwimp_force_redraw((wimp_w)global_history_tree->handle,
|
||||
|
Loading…
x
Reference in New Issue
Block a user