Skip to content

Commit

Permalink
Merge pull request 'Online installer review' (#137) from feature/onli…
Browse files Browse the repository at this point in the history
…ne-installer-review-r8 into release/v8.3.0
  • Loading branch information
maxkadushkin committed Dec 27, 2024
2 parents e9ddb63 + a4bd23e commit 5e8b29b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
22 changes: 13 additions & 9 deletions win-linux/extras/online-installer/src/uiclasses/drawningengine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,19 @@ void DrawingEngine::FillBackground() const

void DrawingEngine::DrawBorder() const
{
HPEN hPen = CreatePen(PS_SOLID, m_ds->metrics()->value(Metrics::BorderWidth), m_ds->palette()->color(Palette::Border));
HPEN oldPen = (HPEN)SelectObject(m_hdc, hPen);
MoveToEx(m_hdc, m_rc->left, m_rc->top, NULL);
LineTo(m_hdc, m_rc->right - 1, m_rc->top);
LineTo(m_hdc, m_rc->right - 1, m_rc->bottom - 1);
LineTo(m_hdc, m_rc->left, m_rc->bottom - 1);
LineTo(m_hdc, m_rc->left, m_rc->top);
SelectObject(m_hdc, oldPen);
DeleteObject(hPen);
RECT rc;
SetRect(&rc, m_rc->left, m_rc->top, m_rc->right, m_rc->bottom);
HBRUSH brdBrush = CreateSolidBrush(m_ds->palette()->color(Palette::Border));
HBRUSH oldBrdBrush = (HBRUSH)SelectObject(m_hdc, brdBrush);
for (int i = 0; i < m_ds->metrics()->value(Metrics::BorderWidth); i++) {
FrameRect(m_hdc, &rc, brdBrush);
rc.left += i + 1;
rc.top += i + 1;
rc.right -= i + 1;
rc.bottom -= i + 1;
}
SelectObject(m_hdc, oldBrdBrush);
DeleteObject(brdBrush);
}

void DrawingEngine::DrawTopBorder(int brdWidth, COLORREF brdColor) const
Expand Down
2 changes: 1 addition & 1 deletion win-linux/extras/online-installer/src/uiclasses/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ void Window::showMaximized()
void Window::setIcon(int id)
{
HMODULE hInstance = GetModuleHandle(NULL);
HICON hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(id));
HICON hIcon = (HICON)LoadImage(hInstance, MAKEINTRESOURCE(id), IMAGE_ICON, 96, 96, LR_DEFAULTCOLOR | LR_SHARED);
SendMessage(m_hWnd, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
SendMessage(m_hWnd, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
}
Expand Down

0 comments on commit 5e8b29b

Please sign in to comment.