Page MenuHomePhabricator

[Segmentation]Warnings not displayed in red
Closed, ResolvedPublic

Description

When the segmentation plugin is opened and there is no image loaded, the warning "Please load an image" is supposed to be displayed in red. Similar when loading an image but missing a segmentation the warning "Select or create a segmentation" should be displayed in red.
Using the Light theme everything is displayed correctly.
Using the Dark theme the warnings are printed in white instead of red.
tested on Windows 10

Revisions and Commits

rMITK MITK

Event Timeline

kislinsk added subscribers: floca, kislinsk.

@floca I think I remember you worked on theme-specific warning colors at the last hacking week. Can you give us a hint how to use it, please? :-)

You can use css syntax.

Currently we have 3 classes for the font tag

  • warning
  • highlight
  • normal (which can normally ignored and is only needed to override other css settings if you want normal text)

To use it wrap your text in the font tag with the appropriated class:
e.G. for a warning:

"<font class=\"warning\">Please load an image</font>"
IMPORTANT: This only works with the master since december. Because then the feature was added with the selection reworks. Be sure that you are not on an outdated branch.

By the way, shouldn't the text be "select" instead of "load". It should not be the job of the segmentation plugin to propose from where the image comes, just state that there is nothing to work with.

@floca Thanks.
Sadly, it doesn't work yet with the dark theme (and I have no clue about CSS to fix it).
What works is

"<font color=\"red\">red label</font>

@floca Thanks.
Sadly, it doesn't work yet with the dark theme (and I have no clue about CSS to fix it).
What works is

"<font color=\"red\">red label</font>

It should?!? I use that feature in our selection widgets also in the dark theme!

See e.g.

void QmitkAbstractNodeSelectionWidget::SetInvalidInfo(QString info)

It works in the selection widget with light and the dark theme. Just checked it again with a fresh master build.