mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Make it possible to use the Tag System in dark themes
The color used on the bright theme was cyan, and it's too bright when the font is also white. This patch uses the HSL information of the color to determine if the text color is light or dark, and adjusting the background color for that. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									9e57dd4826
								
							
						
					
					
						commit
						bdd1b3b546
					
				
					 2 changed files with 27 additions and 3 deletions
				
			
		|  | @ -207,7 +207,12 @@ void GroupedLineEdit::paintEvent(QPaintEvent *e) | |||
| 			i.toFront(); | ||||
| 		path.addRoundedRect(rectangle, 5.0, 5.0); | ||||
| 		painter.setPen(i.peekNext()); | ||||
| 		painter.setBrush(i.next().lighter(180)); | ||||
| 		if (palette().color(QPalette::Text).lightnessF() <= 0.3 ) | ||||
| 			painter.setBrush(i.next().lighter()); | ||||
| 		else if (palette().color(QPalette::Text).lightnessF() <= 0.6 ) | ||||
| 			painter.setBrush(i.next()); | ||||
| 		else | ||||
| 			painter.setBrush(i.next().darker()); | ||||
| 		painter.drawPath(path); | ||||
| 	} | ||||
| #endif | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue