/**
* @brief Width of compare method name pane in statusbar
*/
-const int COMPMETHOD_PANEL_WIDTH = 140;
+const int COMPMETHOD_PANEL_WIDTH = 105;
/**
* @brief Width of filter name pane in statusbar
*/
-const int FILTER_PANEL_WIDTH = 180;
+const int FILTER_PANEL_WIDTH = 135;
/**
* @brief Bottom statusbar panels and indicators
}
String sText = _("RO");
- m_wndStatusBar.SetPaneInfo(PANE_COMPMETHOD, ID_STATUS_FILTER, 0, COMPMETHOD_PANEL_WIDTH);
- m_wndStatusBar.SetPaneInfo(PANE_FILTER, ID_STATUS_FILTER, 0, FILTER_PANEL_WIDTH);
- m_wndStatusBar.SetPaneInfo(PANE_LEFT_RO, ID_STATUS_LEFTDIR_RO, 0, RO_PANEL_WIDTH);
- m_wndStatusBar.SetPaneInfo(PANE_MIDDLE_RO, ID_STATUS_MIDDLEDIR_RO, 0, RO_PANEL_WIDTH);
- m_wndStatusBar.SetPaneInfo(PANE_RIGHT_RO, ID_STATUS_RIGHTDIR_RO, 0, RO_PANEL_WIDTH);
+ const int lpx = CClientDC(this).GetDeviceCaps(LOGPIXELSX);
+ auto pointToPixel = [lpx](int point) { return MulDiv(point, lpx, 72); };
+ m_wndStatusBar.SetPaneInfo(PANE_COMPMETHOD, ID_STATUS_FILTER, 0, pointToPixel(COMPMETHOD_PANEL_WIDTH));
+ m_wndStatusBar.SetPaneInfo(PANE_FILTER, ID_STATUS_FILTER, 0, pointToPixel(FILTER_PANEL_WIDTH));
+ m_wndStatusBar.SetPaneInfo(PANE_LEFT_RO, ID_STATUS_LEFTDIR_RO, 0, pointToPixel(RO_PANEL_WIDTH));
+ m_wndStatusBar.SetPaneInfo(PANE_MIDDLE_RO, ID_STATUS_MIDDLEDIR_RO, 0, pointToPixel(RO_PANEL_WIDTH));
+ m_wndStatusBar.SetPaneInfo(PANE_RIGHT_RO, ID_STATUS_RIGHTDIR_RO, 0, pointToPixel(RO_PANEL_WIDTH));
m_wndStatusBar.SetPaneText(PANE_LEFT_RO, sText.c_str(), TRUE);
m_wndStatusBar.SetPaneText(PANE_MIDDLE_RO, sText.c_str(), TRUE);
m_wndStatusBar.SetPaneText(PANE_RIGHT_RO, sText.c_str(), TRUE);
*/
void CHexMergeFrame::CreateHexWndStatusBar(CStatusBar &wndStatusBar, CWnd *pwndPane)
{
+ const int lpx = CClientDC(this).GetDeviceCaps(LOGPIXELSX);
+ auto pointToPixel = [lpx](int point) { return MulDiv(point, lpx, 72); };
wndStatusBar.Create(pwndPane, WS_CHILD|WS_VISIBLE);
wndStatusBar.SetIndicators(0, 3);
wndStatusBar.SetPaneInfo(0, 0, SBPS_STRETCH, 0);
- wndStatusBar.SetPaneInfo(1, 0, 0, 80);
- wndStatusBar.SetPaneInfo(2, 0, 0, 80);
+ wndStatusBar.SetPaneInfo(1, 0, 0, pointToPixel(60));
+ wndStatusBar.SetPaneInfo(2, 0, 0, pointToPixel(60));
wndStatusBar.SetParent(this);
wndStatusBar.SetWindowPos(&wndBottom, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
}
theApp.SetIndicators(m_wndStatusBar, StatusbarIndicators,
countof(StatusbarIndicators));
- m_wndStatusBar.SetPaneInfo(1, ID_STATUS_PLUGIN, 0, 300);
- m_wndStatusBar.SetPaneInfo(2, ID_STATUS_MERGINGMODE, 0, 100);
- m_wndStatusBar.SetPaneInfo(3, ID_STATUS_DIFFNUM, 0, 150);
+ const int lpx = CClientDC(this).GetDeviceCaps(LOGPIXELSX);
+ auto pointToPixel = [lpx](int point) { return MulDiv(point, lpx, 72); };
+ m_wndStatusBar.SetPaneInfo(1, ID_STATUS_PLUGIN, 0, pointToPixel(225));
+ m_wndStatusBar.SetPaneInfo(2, ID_STATUS_MERGINGMODE, 0, pointToPixel(75));
+ m_wndStatusBar.SetPaneInfo(3, ID_STATUS_DIFFNUM, 0, pointToPixel(112));
if (GetOptionsMgr()->GetBool(OPT_SHOW_STATUSBAR) == false)
CMDIFrameWnd::ShowControlBar(&m_wndStatusBar, false, 0);