← Back to team overview

linuxdcpp-team team mailing list archive

[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2538: splitter highlight

 

------------------------------------------------------------
revno: 2538
committer: poy <poy@xxxxxxxxxx>
branch nick: trunk
timestamp: Sat 2011-05-28 17:26:51 +0200
message:
  splitter highlight
modified:
  dwt/src/widgets/Splitter.cpp


--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk

Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'dwt/src/widgets/Splitter.cpp'
--- dwt/src/widgets/Splitter.cpp	2011-05-28 15:12:11 +0000
+++ dwt/src/widgets/Splitter.cpp	2011-05-28 15:26:51 +0000
@@ -66,11 +66,14 @@
 		(horizontal ? rect.pos.x : rect.pos.y) -= 2;
 		(horizontal ? rect.size.x : rect.size.y) += 4;
 
-		theme.drawBackground(canvas, WP_CAPTION, hovering ? CS_ACTIVE : CS_INACTIVE, rect, true, canvas.getPaintRect());
-
-	} else if(hovering) {
-		// safe to assume that the text color is different enough from the default background.
-		canvas.fill(canvas.getPaintRect(), Brush(Brush::WindowText));
+		theme.drawBackground(canvas, WP_CAPTION, CS_ACTIVE, rect, true, canvas.getPaintRect());
+
+	} else {
+		canvas.fill(canvas.getPaintRect(), Brush(Brush::ActiveCaption));
+	}
+
+	if(hovering) {
+		canvas.invert(Region(canvas.getPaintRect()));
 	}
 }