mirror of
https://github.com/reactos/reactos.git
synced 2024-12-29 10:35:28 +00:00
Winefile:
- fix item background color for non-white windows background - fix drive size output: wsprintf() -> _stprintf() - declare COLOR_SELECTION_TXT svn path=/trunk/; revision=18483
This commit is contained in:
parent
00a4a8acbd
commit
79ec345d3a
2 changed files with 13 additions and 3 deletions
|
@ -2832,12 +2832,21 @@ static void format_bytes(LPTSTR buffer, LONGLONG bytes)
|
||||||
|
|
||||||
float fBytes = (float)bytes;
|
float fBytes = (float)bytes;
|
||||||
|
|
||||||
|
#ifdef __WINE__ /* work around for incorrect implementation of wsprintf()/_stprintf() in WINE */
|
||||||
if (bytes >= 1073741824) /* 1 GB */
|
if (bytes >= 1073741824) /* 1 GB */
|
||||||
wsprintf(buffer, sFmtGB, fBytes/1073741824.f+.5f);
|
wsprintf(buffer, sFmtGB, fBytes/1073741824.f+.5f);
|
||||||
else if (bytes >= 1048576) /* 1 MB */
|
else if (bytes >= 1048576) /* 1 MB */
|
||||||
wsprintf(buffer, sFmtMB, fBytes/1048576.f+.5f);
|
wsprintf(buffer, sFmtMB, fBytes/1048576.f+.5f);
|
||||||
else if (bytes >= 1024) /* 1 kB */
|
else if (bytes >= 1024) /* 1 kB */
|
||||||
wsprintf(buffer, sFmtkB, fBytes/1024.f+.5f);
|
wsprintf(buffer, sFmtkB, fBytes/1024.f+.5f);
|
||||||
|
#else
|
||||||
|
if (bytes >= 1073741824) /* 1 GB */
|
||||||
|
_stprintf(buffer, sFmtGB, fBytes/1073741824.f+.5f);
|
||||||
|
else if (bytes >= 1048576) /* 1 MB */
|
||||||
|
_stprintf(buffer, sFmtMB, fBytes/1048576.f+.5f);
|
||||||
|
else if (bytes >= 1024) /* 1 kB */
|
||||||
|
_stprintf(buffer, sFmtkB, fBytes/1024.f+.5f);
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
_stprintf(buffer, sLongNumFmt, bytes);
|
_stprintf(buffer, sLongNumFmt, bytes);
|
||||||
}
|
}
|
||||||
|
@ -3218,10 +3227,10 @@ static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWi
|
||||||
textcolor = RGB(0,0,0);
|
textcolor = RGB(0,0,0);
|
||||||
|
|
||||||
if (dis->itemState & ODS_FOCUS) {
|
if (dis->itemState & ODS_FOCUS) {
|
||||||
textcolor = RGB(255,255,255);
|
textcolor = COLOR_SELECTION_TXT;
|
||||||
bkcolor = COLOR_SELECTION;
|
bkcolor = COLOR_SELECTION;
|
||||||
} else {
|
} else {
|
||||||
bkcolor = RGB(255,255,255);
|
bkcolor = GetSysColor(COLOR_WINDOW);
|
||||||
}
|
}
|
||||||
|
|
||||||
hbrush = CreateSolidBrush(bkcolor);
|
hbrush = CreateSolidBrush(bkcolor);
|
||||||
|
@ -3430,7 +3439,7 @@ static void draw_item(Pane* pane, LPDRAWITEMSTRUCT dis, Entry* entry, int calcWi
|
||||||
HPEN lastPen;
|
HPEN lastPen;
|
||||||
HPEN hpen;
|
HPEN hpen;
|
||||||
|
|
||||||
if (!(GetVersion() & 0x80000000)) { /* Windows NT? */
|
if (!(GetVersion() & 0x80000000)) { /* Windows NT or higher? */
|
||||||
LOGBRUSH lb = {PS_SOLID, RGB(255,255,255)};
|
LOGBRUSH lb = {PS_SOLID, RGB(255,255,255)};
|
||||||
hpen = ExtCreatePen(PS_COSMETIC|PS_ALTERNATE, 1, &lb, 0, 0);
|
hpen = ExtCreatePen(PS_COSMETIC|PS_ALTERNATE, 1, &lb, 0, 0);
|
||||||
} else
|
} else
|
||||||
|
|
|
@ -101,6 +101,7 @@ enum IMAGE {
|
||||||
|
|
||||||
#define COLOR_COMPRESSED RGB(0,0,255)
|
#define COLOR_COMPRESSED RGB(0,0,255)
|
||||||
#define COLOR_SELECTION RGB(0,0,128)
|
#define COLOR_SELECTION RGB(0,0,128)
|
||||||
|
#define COLOR_SELECTION_TXT RGB(255,255,255)
|
||||||
|
|
||||||
#ifdef _NO_EXTENSIONS
|
#ifdef _NO_EXTENSIONS
|
||||||
#define COLOR_SPLITBAR WHITE_BRUSH
|
#define COLOR_SPLITBAR WHITE_BRUSH
|
||||||
|
|
Loading…
Reference in a new issue