From b5a4fe220d7510cd0875361885fa52d9dab1b84e Mon Sep 17 00:00:00 2001 From: rylek Date: Fri, 30 Sep 2011 08:01:28 +0000 Subject: [PATCH] .TCtrlLib/Ruler.cpp: ruler highlighting improved git-svn-id: svn://ultimatepp.org/upp/trunk@3931 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- uppsrc/TCtrlLib/Ruler.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/uppsrc/TCtrlLib/Ruler.cpp b/uppsrc/TCtrlLib/Ruler.cpp index 928e2df9f..8bc5dcfe6 100644 --- a/uppsrc/TCtrlLib/Ruler.cpp +++ b/uppsrc/TCtrlLib/Ruler.cpp @@ -264,6 +264,7 @@ void RulerCtrl::Paint(Draw& draw) && rep_count > 0 /*&& rep_count * text_step.GetCount() <= TEXT_LIMIT*/) { int ix = BinFindIndex(text_step, pos1 - rep_index * text_repeat); int ppos = (is_right ? SMALL_SIZE : cheight - cy - SMALL_SIZE); + int rpos = (is_right ? 0 : cheight - SMALL_SIZE - 1); for(int c = fround(rep_count); --c >= 0; ix = 0, rep_index++) { int lim = text_step.GetCount(); double dp2 = pos2 - rep_index * text_repeat; @@ -285,12 +286,14 @@ void RulerCtrl::Paint(Draw& draw) Size tsize = GetTextSize(text, font); int half = tsize.cx >> 1; if(is_vert) { - draw.DrawRect(0, cli, ppos, 1, Gray()); + draw.DrawRect(0, cli, ppos, 1, Black()); + draw.DrawRect(rpos, cli, SMALL_SIZE + 1, 1, Black()); // draw.DrawRect(ppos - VGAP, cli - half - HGAP, tsize.cy + 2 * VGAP, tsize.cx + 2 * HGAP, background); draw.DrawText(ppos, cli + half, 900, text, font, Gray()); } else { - draw.DrawRect(cli, 0, 1, ppos, Gray()); + draw.DrawRect(cli, 0, 1, ppos, Black()); + draw.DrawRect(cli, rpos, 1, SMALL_SIZE + 1, Black()); // draw.DrawRect(cli - half - HGAP, ppos - VGAP, tsize.cx + 2 * HGAP, tsize.cy + 2 * VGAP, background); draw.DrawText(cli - half, ppos, text, font, Gray()); }