Opened 12 years ago

Closed 12 years ago

Last modified 5 years ago

#5956 closed defect (fixed)

GUI: Clear buttons not properly updated when switching theme

Reported by: lordhoto Owned by: eriktorbjorn
Priority: normal Component: GUI
Version: Keywords:
Cc: Game:

Description

Tested with: ScummVM git commit 2d6fda8c85dc58546d2cc57a7db0d77bb2b72e5c Platform: Linux/amd64 Compiler: g++ 4.6.2

When switching the GUI theme in the options menu and afterwards (without closing the menu!) switching to the "Paths" tab makes the buttons still have the image enabled configuration from the old theme. For example: When you start ScummVM with the classic theme, go to options and select the modern theme, go to paths, the clear buttons will have a "C" as letter on them instead of the graphical "X". When doing this with the modern theme loaded initially and switching to the builtin theme the behavior is exactly the opposite. It might be noteworthy that if you close the Options menu by clicking OK after you switched the theme and open it up again the buttons will have the correct style.

Ticket imported from: #3482459. Ticket imported from: bugs/5956.

Attachments (1)

clear-buttons.diff (4.5 KB ) - added by eriktorbjorn 12 years ago.
One possible patch against current git

Download all attachments as: .zip

Change History (7)

comment:1 by eriktorbjorn, 12 years ago

Another thing that may be noteworthy is that you can see the launcher's clear button behind the options dialog, and that one's drawn correctly even before closing the options dialog.

comment:2 by eriktorbjorn, 12 years ago

I guess the launcher's button works because LauncherDialog::reflowLayout() recreates the clear button, so it gets the appropriate graphics. GlobalOptionsDialog has nothing like that. (So far, my attempts to add it has caused ScummVM to crash, so I couldn't say if adding it would help.)

comment:3 by eriktorbjorn, 12 years ago

I'm attaching a patch which might possibly work. Something crashed for me on one attempt, but I don't remember exactly what I did and I haven't been able to reproduce it. I don't know if it's the correct approach, but it's an idea at least.

by eriktorbjorn, 12 years ago

Attachment: clear-buttons.diff added

One possible patch against current git

comment:4 by eriktorbjorn, 12 years ago

Owner: set to eriktorbjorn
Resolution: fixed
Status: newclosed

comment:5 by eriktorbjorn, 12 years ago

I've committed my patch, after a brief discussion with LordHoto.

comment:6 by digitall, 5 years ago

Component: GUI
Note: See TracTickets for help on using tickets.