[commit] r2438 - in trunk/GME: CSGUI ObjectInspector
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Tue Feb 18 16:29:52 CST 2014
Author: ksmyth
Date: Tue Feb 18 16:29:52 2014
New Revision: 2438
Log:
Fix some DPI issues (META-2857)
Modified:
trunk/GME/CSGUI/WelcomeScreen.cs
trunk/GME/ObjectInspector/ComboBoxSelectDlg.cpp
trunk/GME/ObjectInspector/ComboBoxSelectDlg.h
trunk/GME/ObjectInspector/InPlaceManager.cpp
Modified: trunk/GME/CSGUI/WelcomeScreen.cs
==============================================================================
--- trunk/GME/CSGUI/WelcomeScreen.cs Tue Feb 18 16:29:41 2014 (r2437)
+++ trunk/GME/CSGUI/WelcomeScreen.cs Tue Feb 18 16:29:52 2014 (r2438)
@@ -53,6 +53,9 @@
{
this.recents = recents;
int y = 20;
+ using (Graphics g = this.CreateGraphics())
+ {
+
foreach (string recent_ in recents)
{
string recent = recent_;
@@ -62,14 +65,16 @@
recentLink.AutoSize = false;
recentLink.AutoEllipsis = true;
recentLink.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- recentLink.Size = new Size(grpRecents.Size.Width - 14, 20);
+ recentLink.Size = new Size(grpRecents.Size.Width - 14,
+ (int)Math.Ceiling(20 * g.DpiY / 96));
recentLink.LinkClicked += delegate(object sender, LinkLabelLinkClickedEventArgs args)
{
this.SelectedProject = recent;
this.Close();
};
grpRecents.Controls.Add(recentLink);
- y += 23;
+ y += 4 + recentLink.Size.Height;
+ }
}
this.btnOpen.Click += new EventHandler(delegate(object o, EventArgs args)
Modified: trunk/GME/ObjectInspector/ComboBoxSelectDlg.cpp
==============================================================================
--- trunk/GME/ObjectInspector/ComboBoxSelectDlg.cpp Tue Feb 18 16:29:41 2014 (r2437)
+++ trunk/GME/ObjectInspector/ComboBoxSelectDlg.cpp Tue Feb 18 16:29:52 2014 (r2438)
@@ -19,8 +19,8 @@
class CListItem;
-CComboBoxSelectDlg::CComboBoxSelectDlg(CWnd* pParent /*=NULL*/)
- : CDialog(CComboBoxSelectDlg::IDD, pParent)
+CComboBoxSelectDlg::CComboBoxSelectDlg(CWnd* pParent, int comboboxLineHeight)
+ : CDialog(CComboBoxSelectDlg::IDD, pParent), m_ComboboxLineHeight(comboboxLineHeight)
{
//{{AFX_DATA_INIT(CComboBoxSelectDlg)
// NOTE: the ClassWizard will add member initialization here
@@ -73,7 +73,7 @@
CDialog::OnInitDialog();
SetWindowPos( NULL, m_RectBound.left, m_RectBound.top, m_RectBound.Width(), m_RectBound.Height(), SWP_NOZORDER );
- CRect rect( 0, 0, m_RectBound.Width(), m_RectBound.Height() + 13 /* FIXME: m_ComboboxLineHeight */ );
+ CRect rect( 0, 0, m_RectBound.Width(), m_RectBound.Height() + m_ComboboxLineHeight);
m_lstBox.Create( LBS_NOTIFY | WS_VSCROLL, rect, this, IDC_COMBO_LISTBOX );
m_lstBox.SetFont( m_pFontWnd );
Modified: trunk/GME/ObjectInspector/ComboBoxSelectDlg.h
==============================================================================
--- trunk/GME/ObjectInspector/ComboBoxSelectDlg.h Tue Feb 18 16:29:41 2014 (r2437)
+++ trunk/GME/ObjectInspector/ComboBoxSelectDlg.h Tue Feb 18 16:29:52 2014 (r2438)
@@ -15,10 +15,11 @@
{
bool m_bInited;
bool m_bClosed;
+ int m_ComboboxLineHeight;
// Construction
public:
- CComboBoxSelectDlg(CWnd* pParent = NULL); // standard constructor
+ CComboBoxSelectDlg(CWnd* pParent, int comboboxLineHeight);
// Attributes
protected :
Modified: trunk/GME/ObjectInspector/InPlaceManager.cpp
==============================================================================
--- trunk/GME/ObjectInspector/InPlaceManager.cpp Tue Feb 18 16:29:41 2014 (r2437)
+++ trunk/GME/ObjectInspector/InPlaceManager.cpp Tue Feb 18 16:29:52 2014 (r2438)
@@ -625,7 +625,7 @@
void CInPlaceManager::DisplayCombo(CRect rectBound)
{
- CComboBoxSelectDlg dlg(m_pInspectorList);
+ CComboBoxSelectDlg dlg(m_pInspectorList, m_pInspectorList->m_ComboboxLineHeight);
CListItem& ListItem = m_pInspectorList->m_ListItemArray.ElementAt( m_nCurrentIndex );
m_pInspectorList->ClientToScreen( &rectBound );
More information about the gme-commit
mailing list