| 43 | } |
| 44 | |
| 45 | QColor defaultAccent(const QColor& window_color) { |
| 46 | // The app sets QPalette::Window per theme but not QPalette::Highlight, so we |
| 47 | // derive the theme from the window lightness rather than trusting the (system) |
| 48 | // highlight. Dark chrome -> pale grey; light chrome -> info blue. |
| 49 | return window_color.lightness() < 128 ? kPillAccentDark : kPillAccentLight; |
| 50 | } |
| 51 | |
| 52 | } // namespace PJ::scrollbar_detail |
| 53 |
no outgoing calls