mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
.TCtrlLib/Ruler.cpp: ruler highlighting improved
git-svn-id: svn://ultimatepp.org/upp/trunk@3931 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
50c20c14ff
commit
b5a4fe220d
1 changed files with 5 additions and 2 deletions
|
|
@ -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());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue