Opened 4 years ago

Closed 2 years ago

#15941 closed bug (fixed)

JPEG & JPEG 2000 Translators about tabs are using document text colour

Reported by: Starcrasher Owned by: nobody
Priority: normal Milestone: R1/beta4
Component: Add-Ons/Translators Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

About tab of JPEG and JPEG2000 translators are using document text colour in addition of panel text colour.
We can't be sure that it will be readable depending of user colour choices.
Better use panel text colour everywhere or a derivative of it if distinction is necessary.

That's also the case of NanoSVG and PDF translators btw

Change History (3)

comment:1 by nephele, 4 years ago

It looks to me like none of the translators ever set a fg color explicitly :g edit: if i am reading the docs right i should be able to just use AdoptSystemColors() instead and it should work.

$ pwd
/home/nep/proj/haiku/src/add-ons/translators

$ rg B[A-Z_]+COLOR
stxt/STXTView.cpp
32:	SetViewUIColor(B_PANEL_BACKGROUND_COLOR);

wonderbrush/WonderBrushView.cpp
54:	SetViewUIColor(B_PANEL_BACKGROUND_COLOR);

webp/ConfigView.cpp
59:	SetViewUIColor(B_PANEL_BACKGROUND_COLOR);

jpeg2000/JPEG2000Translator.cpp
727:	infoView->SetViewUIColor(B_PANEL_BACKGROUND_COLOR);

exr/ConfigView.cpp
29:	SetViewUIColor(B_PANEL_BACKGROUND_COLOR);

gif/GIFView.cpp
52:	SetViewUIColor(B_PANEL_BACKGROUND_COLOR);

bmp/BMPView.cpp
31:	SetViewUIColor(B_PANEL_BACKGROUND_COLOR);

png/PNGView.cpp
34:	SetViewUIColor(B_PANEL_BACKGROUND_COLOR);

tga/TGAView.cpp
50:	SetViewUIColor(B_PANEL_BACKGROUND_COLOR);

pcx/ConfigView.cpp
27:	SetViewUIColor(B_PANEL_BACKGROUND_COLOR);

raw/ConfigView.cpp
28:	SetViewUIColor(B_PANEL_BACKGROUND_COLOR);

rtf/ConfigView.cpp
23:	SetViewUIColor(B_PANEL_BACKGROUND_COLOR);

jpeg/JPEGTranslator.cpp
686:	infoView->SetViewUIColor(B_PANEL_BACKGROUND_COLOR);

tiff/TIFFView.cpp
79:	SetViewUIColor(B_PANEL_BACKGROUND_COLOR);

ppm/PPMTranslator.cpp
122:		g_settings.out_space = B_NO_COLOR_SPACE;
343:			|| ioExtension->FindInt32( B_TRANSLATOR_EXT_BITMAP_COLOR_SPACE,
345:			|| (out_space == B_NO_COLOR_SPACE)) {
346:			if (g_settings.out_space == B_NO_COLOR_SPACE) {
432:		SetViewUIColor(B_PANEL_BACKGROUND_COLOR);
451:			new BMenuItem(B_TRANSLATE("None"), CSMessage(B_NO_COLOR_SPACE)));
634:	const char* name = B_TRANSLATOR_EXT_BITMAP_COLOR_SPACE;
$
Last edited 4 years ago by nephele (previous) (diff)

comment:2 by pulkomandy, 4 years ago

I'm not sure AdoptSystemColors will work here, my guess is these are using BTextView which is normally B_DOCUMENT_TEXT_COLOR on B_DOCUMENT_BACKGROUND_COLOR, and change only the foreground. AdoptSystemColors would just go back to document colors instead of panel ones.

So we need to explicitly set B_PANEL_TEXT_COLOR for these, and no one noticed because in the default theme both colors are the same (black text).

comment:3 by waddlesplash, 2 years ago

Milestone: UnscheduledR1/beta4
Resolution: fixed
Status: newclosed

Fix merged in hrev55882

Note: See TracTickets for help on using tickets.