Forráskód Böngészése

LibGUI: Paint TextEditor background same as widget's if it's not enabled

Now TextEditor draws it's background as a colour that does not make the
user think it can be writed into. This also affects TextBox.
Andres Vieira 5 éve
szülő
commit
be8dc41b9c
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      Libraries/LibGUI/TextEditor.cpp

+ 1 - 1
Libraries/LibGUI/TextEditor.cpp

@@ -359,7 +359,7 @@ Gfx::Rect TextEditor::visible_text_rect_in_inner_coordinates() const
 
 
 void TextEditor::paint_event(PaintEvent& event)
 void TextEditor::paint_event(PaintEvent& event)
 {
 {
-    Color widget_background_color = palette().color(background_role());
+    Color widget_background_color = palette().color(is_enabled() ? background_role() : Gfx::ColorRole::Window);
     // NOTE: This ensures that spans are updated before we look at them.
     // NOTE: This ensures that spans are updated before we look at them.
     flush_pending_change_notification_if_needed();
     flush_pending_change_notification_if_needed();