mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
CodeEditor: Conversion warnings resolved
This commit is contained in:
parent
7c239a10d9
commit
6a673b95a6
3 changed files with 13 additions and 7 deletions
|
|
@ -195,7 +195,7 @@ void CSyntax::ScanSyntax(const wchar *ln, const wchar *e, int line, int tab_size
|
|||
}
|
||||
if(cl == 0) {
|
||||
blk_end.y = line;
|
||||
blk_end.x = e - ln;
|
||||
blk_end.x = int(e - ln);
|
||||
}
|
||||
p = e;
|
||||
}
|
||||
|
|
@ -255,7 +255,7 @@ void CSyntax::ScanSyntax(const wchar *ln, const wchar *e, int line, int tab_size
|
|||
auto Cl0Pos = [&](Point& t) {
|
||||
if(cl == 0) {
|
||||
t.y = line;
|
||||
t.x = p - 1 - ln;
|
||||
t.x = int(p - 1 - ln);
|
||||
}
|
||||
};
|
||||
if(c == '/') break;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ Color FaceColor(int adj)
|
|||
return AdjustColor(SColorFace(), adj);
|
||||
};
|
||||
|
||||
void SyntheticTab(int i, int roundness, Color ink)
|
||||
void SyntheticTab(int i, int roundness, Color ink, int pen)
|
||||
{
|
||||
TabCtrl::Style& s = TabCtrl::StyleDefault().Write();
|
||||
s.body = MakeButton(0, FaceColor(8), DPI(1), ink);
|
||||
|
|
@ -32,11 +32,16 @@ void SyntheticTab(int i, int roundness, Color ink)
|
|||
CORNER_TOP_LEFT|CORNER_TOP_RIGHT);
|
||||
s.first[i] = s.last[i] = s.both[i] = s.normal[i] = ChHot(Crop(t, 0, 0, t.GetWidth(), t.GetHeight() - DPI(3)), DPI(3));
|
||||
s.margin = 0;
|
||||
s.sel = Rect(0, DPI(1), 0, DPI(1));
|
||||
s.extendleft = DPI(2);
|
||||
s.sel = Rect(0, pen, 0, pen);
|
||||
s.extendleft = 2 * pen;
|
||||
s.text_color[i] = SColorText();
|
||||
}
|
||||
|
||||
void SyntheticTab(int i, int roundness, Color ink)
|
||||
{
|
||||
SyntheticTab(i, roundness, ink, DPI(1));
|
||||
}
|
||||
|
||||
void MakeDialogIcons()
|
||||
{
|
||||
auto MakeCircularIcon = [](Color c, const byte *signc, int csz, double ssz = 0.6, Color sc = White()) -> Image
|
||||
|
|
@ -448,8 +453,9 @@ Image WithBottomLine(const Image& m, Color c, int w)
|
|||
return WithRect(m, 0, m.GetHeight() - w, m.GetWidth(), w, c);
|
||||
}
|
||||
|
||||
void ChSynthetic(Image *button100x100, Color *text, bool macos)
|
||||
void ChSynthetic(Image *button100x100, Color *text, bool macos, int dpi)
|
||||
{
|
||||
auto DPI = [&](int i) { return dpi * i; };
|
||||
int roundness = DPI(3);
|
||||
int roundness2 = roundness;
|
||||
Color ink = SColorText();
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ Image WithBottomLine(const Image& m, Color c, int w = DPI(1));
|
|||
Color FaceColor(int adj);
|
||||
|
||||
// Creates synthetic style based on SColors and basic button face
|
||||
void ChSynthetic(Image *button100x100, Color *text, bool macos = false);
|
||||
void ChSynthetic(Image *button100x100, Color *text, bool macos = false, int dpi = DPI(1));
|
||||
|
||||
// for diagnostics purposes
|
||||
#ifdef _DEBUG
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue