Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
6a40d65b
Commit
6a40d65b
authored
May 29, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
comdlg32: Scale the shell folder list in the open dialog with the font size.
parent
60b5ae78
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
26 deletions
+29
-26
filedlg.c
dlls/comdlg32/filedlg.c
+28
-26
filedlgbrowser.c
dlls/comdlg32/filedlgbrowser.c
+1
-0
No files found.
dlls/comdlg32/filedlg.c
View file @
6a40d65b
...
...
@@ -110,7 +110,6 @@ typedef struct tagLookInInfo
*/
/* Draw item constant */
#define ICONWIDTH 18
#define XTEXTOFFSET 3
/* AddItem flags*/
...
...
@@ -3182,7 +3181,8 @@ static void FILEDLG95_LOOKIN_Init(HWND hwndCombo)
IShellFolder
*
psfRoot
,
*
psfDrives
;
IEnumIDList
*
lpeRoot
,
*
lpeDrives
;
LPITEMIDLIST
pidlDrives
,
pidlTmp
,
pidlTmp1
,
pidlAbsTmp
;
HDC
hdc
;
TEXTMETRICW
tm
;
LookInInfos
*
liInfos
=
MemAlloc
(
sizeof
(
LookInInfos
));
TRACE
(
"
\n
"
);
...
...
@@ -3191,9 +3191,14 @@ static void FILEDLG95_LOOKIN_Init(HWND hwndCombo)
SetPropA
(
hwndCombo
,
LookInInfosStr
,
liInfos
);
hdc
=
GetDC
(
hwndCombo
);
SelectObject
(
hdc
,
(
HFONT
)
SendMessageW
(
hwndCombo
,
WM_GETFONT
,
0
,
0
));
GetTextMetricsW
(
hdc
,
&
tm
);
ReleaseDC
(
hwndCombo
,
hdc
);
/* set item height for both text field and listbox */
CBSetItemHeight
(
hwndCombo
,
-
1
,
GetSystemMetrics
(
SM_CYSMICON
));
CBSetItemHeight
(
hwndCombo
,
0
,
GetSystemMetrics
(
SM_CYSMICON
));
CBSetItemHeight
(
hwndCombo
,
-
1
,
max
(
tm
.
tmHeight
,
GetSystemMetrics
(
SM_CYSMICON
)
));
CBSetItemHeight
(
hwndCombo
,
0
,
max
(
tm
.
tmHeight
,
GetSystemMetrics
(
SM_CYSMICON
)
));
/* Turn on the extended UI for the combo box like Windows does */
CBSetExtendedUI
(
hwndCombo
,
TRUE
);
...
...
@@ -3269,6 +3274,8 @@ static LRESULT FILEDLG95_LOOKIN_DrawItem(LPDRAWITEMSTRUCT pDIStruct)
TEXTMETRICW
tm
;
LPSFOLDER
tmpFolder
;
LookInInfos
*
liInfos
=
GetPropA
(
pDIStruct
->
hwndItem
,
LookInInfosStr
);
UINT
shgfi_flags
=
SHGFI_PIDL
|
SHGFI_OPENICON
|
SHGFI_SYSICONINDEX
|
SHGFI_DISPLAYNAME
;
UINT
icon_width
,
icon_height
;
TRACE
(
"
\n
"
);
...
...
@@ -3280,25 +3287,24 @@ static LRESULT FILEDLG95_LOOKIN_DrawItem(LPDRAWITEMSTRUCT pDIStruct)
return
0
;
icon_width
=
GetSystemMetrics
(
SM_CXICON
);
icon_height
=
GetSystemMetrics
(
SM_CYICON
);
if
(
pDIStruct
->
rcItem
.
bottom
-
pDIStruct
->
rcItem
.
top
<
icon_height
)
{
icon_width
=
GetSystemMetrics
(
SM_CXSMICON
);
icon_height
=
GetSystemMetrics
(
SM_CYSMICON
);
shgfi_flags
|=
SHGFI_SMALLICON
;
}
if
(
pDIStruct
->
itemID
==
liInfos
->
uSelectedItem
)
{
ilItemImage
=
(
HIMAGELIST
)
SHGetFileInfoW
((
LPCWSTR
)
tmpFolder
->
pidlItem
,
0
,
&
sfi
,
sizeof
(
sfi
),
SHGFI_PIDL
|
SHGFI_SMALLICON
|
SHGFI_OPENICON
|
SHGFI_SYSICONINDEX
|
SHGFI_DISPLAYNAME
);
0
,
&
sfi
,
sizeof
(
sfi
),
shgfi_flags
);
}
else
{
ilItemImage
=
(
HIMAGELIST
)
SHGetFileInfoW
((
LPCWSTR
)
tmpFolder
->
pidlItem
,
0
,
&
sfi
,
sizeof
(
sfi
),
SHGFI_PIDL
|
SHGFI_SMALLICON
|
SHGFI_SYSICONINDEX
|
SHGFI_DISPLAYNAME
);
0
,
&
sfi
,
sizeof
(
sfi
),
shgfi_flags
);
}
/* Is this item selected ? */
...
...
@@ -3320,11 +3326,7 @@ static LRESULT FILEDLG95_LOOKIN_DrawItem(LPDRAWITEMSTRUCT pDIStruct)
{
iIndentation
=
0
;
ilItemImage
=
(
HIMAGELIST
)
SHGetFileInfoW
((
LPCWSTR
)
tmpFolder
->
pidlItem
,
0
,
&
sfi
,
sizeof
(
sfi
),
SHGFI_PIDL
|
SHGFI_SMALLICON
|
SHGFI_OPENICON
|
SHGFI_SYSICONINDEX
|
SHGFI_DISPLAYNAME
);
0
,
&
sfi
,
sizeof
(
sfi
),
shgfi_flags
);
}
else
...
...
@@ -3334,17 +3336,17 @@ static LRESULT FILEDLG95_LOOKIN_DrawItem(LPDRAWITEMSTRUCT pDIStruct)
/* Draw text and icon */
/* Initialise the icon display area */
rectIcon
.
left
=
pDIStruct
->
rcItem
.
left
+
ICONWIDTH
/
2
*
iIndentation
;
rectIcon
.
top
=
pDIStruct
->
rcItem
.
top
;
rectIcon
.
right
=
rectIcon
.
left
+
ICONWIDTH
;
rectIcon
.
bottom
=
pDIStruct
->
rcItem
.
bottom
;
rectIcon
.
left
=
pDIStruct
->
rcItem
.
left
+
1
+
icon_width
/
2
*
iIndentation
;
rectIcon
.
top
=
(
pDIStruct
->
rcItem
.
top
+
pDIStruct
->
rcItem
.
bottom
-
icon_height
)
/
2
;
rectIcon
.
right
=
rectIcon
.
left
+
icon_width
+
XTEXTOFFSET
;
rectIcon
.
bottom
=
(
pDIStruct
->
rcItem
.
top
+
pDIStruct
->
rcItem
.
bottom
+
icon_height
)
/
2
;
/* Initialise the text display area */
GetTextMetricsW
(
pDIStruct
->
hDC
,
&
tm
);
rectText
.
left
=
rectIcon
.
right
;
rectText
.
top
=
(
pDIStruct
->
rcItem
.
top
+
pDIStruct
->
rcItem
.
bottom
-
tm
.
tmHeight
)
/
2
;
rectText
.
right
=
pDIStruct
->
rcItem
.
right
+
XTEXTOFFSET
;
rectText
.
right
=
pDIStruct
->
rcItem
.
right
;
rectText
.
bottom
=
(
pDIStruct
->
rcItem
.
top
+
pDIStruct
->
rcItem
.
bottom
+
tm
.
tmHeight
)
/
2
;
...
...
dlls/comdlg32/filedlgbrowser.c
View file @
6a40d65b
...
...
@@ -452,6 +452,7 @@ static HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *iface,
/* Set view window control id to 5002 */
SetWindowLongPtrW
(
hwndView
,
GWLP_ID
,
lst2
);
SendMessageW
(
hwndView
,
WM_SETFONT
,
SendMessageW
(
GetParent
(
hwndView
),
WM_GETFONT
,
0
,
0
),
FALSE
);
/* Select the new folder in the Look In combo box of the Open file dialog */
FILEDLG95_LOOKIN_SelectItem
(
fodInfos
->
DlgInfos
.
hwndLookInCB
,
fodInfos
->
ShellInfos
.
pidlAbsCurrent
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment