Opened 13 years ago
Closed 9 years ago
#8035 closed bug (fixed)
BColorControl not redrawn when switching to and from 8-bit (256 color) mode
Reported by: | jscipione | Owned by: | jscipione |
---|---|---|---|
Priority: | low | Milestone: | R1 |
Component: | Kits/Interface Kit | Version: | R1/Development |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Platform: | All |
Description (last modified by )
BColorControl doesn't redraw itself when switching to or from 8-bit (256 color) mode. Perhaps the app server should tell all controls to redraw themselves when you switch modes.
Attachments (3)
Change History (11)
by , 13 years ago
Attachment: | 8-bit to 32-bit mode ColorControl.png added |
---|
follow-up: 2 comment:1 by , 13 years ago
Component: | Servers/app_server → Kits/Interface Kit |
---|---|
Priority: | normal → low |
Redrawing is not enough, as BColorControl is a complex BView with other controls inside. Basically the only way out is destroying it entirely and building an entirely new one. But this risks breaking stuff around it for example if used in a layouted window...
Everything is obviously redrawn properly, as you can see when switching to 32 bit all controls use the available colors :). So the bug is in the interface kit. Switching component and changing priority.
comment:2 by , 13 years ago
Replying to pulkomandy:
Redrawing is not enough, as BColorControl is a complex BView with other controls inside. Basically the only way out is destroying it entirely and building an entirely new one. But this risks breaking stuff around it for example if used in a layouted window...
Not really. All it would have to do is update its cell size -- it does all the drawing itself, and the only other controls are not affected in palette mode AFAIK (even then they could be hidden/shown as needed).
comment:3 by , 9 years ago
Actually also other colorspaces don't issue a redraw. So switch between any from: CMAP8, 15,16 and 32bit modes..
comment:4 by , 9 years ago
Description: | modified (diff) |
---|
by , 9 years ago
Attachment: | modeswitch.patch added |
---|
Propegate B_SCREEN_CHANGED message to views, BColorControl reads message and rebuilds itself
comment:5 by , 9 years ago
patch: | 0 → 1 |
---|
comment:6 by , 9 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
by , 9 years ago
Attachment: | modeswitch2.patch added |
---|
ebuild control after mode switch App Server sends each window a message that the screen has changed: https://www.haiku-os.org/legacy-docs/bebook/BWindow.html#BWindow_ScreenChanged Propegate B_SCREEN_CHANGED message to all child views first Tell BColorControl to read the B_SCREEN_CHANGED message and reinitialize itself. * Only reinit if switching to or from B_CMAP8 * Initialize all pointers to NULL in constructor * Don't destroy and rebuild offscreen view (and text views) on reinit * Reinitialize offscreen view on reinit.
comment:7 by , 9 years ago
jscipione, While you're at it, can you please also have a look at ticket #12673? Thanks!
Screenshot showing a BColorControl object in the Desktop Preferences pane fail to get redrawn when switching from 8-bit mode to 32-bit mode.