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
45c9fd89
Commit
45c9fd89
authored
Oct 28, 2000
by
Andreas Mohr
Committed by
Alexandre Julliard
Oct 28, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- set the item height not only for the listbox, but also for the text field
- center text vertically - beautify comments
parent
a420e6f9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
15 deletions
+20
-15
combo.c
controls/combo.c
+5
-5
filedlg95.c
dlls/commdlg/filedlg95.c
+15
-10
No files found.
controls/combo.c
View file @
45c9fd89
...
...
@@ -160,7 +160,7 @@ static LRESULT COMBO_NCDestroy( LPHEADCOMBO lphc )
* This method will calculate the height of the text area of the
* combobox.
* The height of the text area is set in two ways.
* It can be set explicitely through a combobox message o
f
through a
* It can be set explicitely through a combobox message o
r
through a
* WM_MEASUREITEM callback.
* If this is not the case, the height is set to 13 dialog units.
* This height was determined through experimentation.
...
...
@@ -613,10 +613,10 @@ static LRESULT COMBO_Create( LPHEADCOMBO lphc, WND* wnd, LPARAM lParam)
/* Now do the trick with parent */
SetParent
(
lphc
->
hWndLBox
,
HWND_DESKTOP
);
/*
* If the combo is a dropdown, we must resize the control
to fit only
* the text area and button. To do this, we send a dummy resize and the
* WM_WINDOWPOSCHANGING message will take care of setting the height for
*
us.
* If the combo is a dropdown, we must resize the control
* to fit only the text area and button. To do this,
* we send a dummy resize and the WM_WINDOWPOSCHANGING message
* will take care of setting the height for
us.
*/
CBForceDummyResize
(
lphc
);
}
...
...
dlls/commdlg/filedlg95.c
View file @
45c9fd89
...
...
@@ -3,7 +3,7 @@
*
* FIXME: lpstrCustomFilter not handled
*
* FIXME: if the size of lpstrFile (nMaxFile) is to small the first
* FIXME: if the size of lpstrFile (nMaxFile) is to
o
small the first
* two bytes of lpstrFile should contain the needed size
*
* FIXME: algorithm for selecting the initial directory is too simple
...
...
@@ -69,7 +69,6 @@ typedef struct tagLookInInfo
/* Draw item constant */
#define ICONWIDTH 18
#define YTEXTOFFSET 2
#define XTEXTOFFSET 3
/* AddItem flags*/
...
...
@@ -85,7 +84,7 @@ typedef struct tagLookInInfo
/* NOTE
* Those macros exist in windowsx.h. However, you can't really use them since
* they rely on the UNICODE defines and can't be use inside Wine itself.
* they rely on the UNICODE defines and can't be use
d
inside Wine itself.
*/
/* Combo box macros */
...
...
@@ -217,7 +216,7 @@ BOOL WINAPI GetFileName95(FileOpenDlgInfos *fodInfos)
(
DLGPROC
)
FileOpenDlgProc95
,
(
LPARAM
)
fodInfos
);
/* Unable to create the dialog*/
/* Unable to create the dialog
*/
if
(
lRes
==
-
1
)
return
FALSE
;
...
...
@@ -842,7 +841,7 @@ static LRESULT FILEDLG95_OnWMInitDialog(HWND hwnd, WPARAM wParam, LPARAM lParam)
/* Initialise dialog UI */
FILEDLG95_InitUI
(
hwnd
);
/* Initialize the Look In combo box*/
/* Initialize the Look In combo box
*/
FILEDLG95_LOOKIN_Init
(
fodInfos
->
DlgInfos
.
hwndLookInCB
);
/* Initialize the filter combo box */
...
...
@@ -1764,6 +1763,9 @@ static HRESULT FILEDLG95_LOOKIN_Init(HWND hwndCombo)
liInfos
->
iMaxIndentation
=
0
;
SetPropA
(
hwndCombo
,
LookInInfosStr
,
(
HANDLE
)
liInfos
);
/* set item height for both text field and listbox */
CBSetItemHeight
(
hwndCombo
,
-
1
,
GetSystemMetrics
(
SM_CYSMICON
));
CBSetItemHeight
(
hwndCombo
,
0
,
GetSystemMetrics
(
SM_CYSMICON
));
/* Initialise data of Desktop folder */
...
...
@@ -1830,6 +1832,7 @@ static LRESULT FILEDLG95_LOOKIN_DrawItem(LPDRAWITEMSTRUCT pDIStruct)
SHFILEINFOA
sfi
;
HIMAGELIST
ilItemImage
;
int
iIndentation
;
TEXTMETRICA
tm
;
LPSFOLDER
tmpFolder
;
...
...
@@ -1866,7 +1869,7 @@ static LRESULT FILEDLG95_LOOKIN_DrawItem(LPDRAWITEMSTRUCT pDIStruct)
SHGFI_DISPLAYNAME
);
}
/* Is this item selected ?*/
/* Is this item selected ?
*/
if
(
pDIStruct
->
itemState
&
ODS_SELECTED
)
{
SetTextColor
(
pDIStruct
->
hDC
,(
0x00FFFFFF
&
~
(
crText
)));
...
...
@@ -1880,7 +1883,7 @@ static LRESULT FILEDLG95_LOOKIN_DrawItem(LPDRAWITEMSTRUCT pDIStruct)
FillRect
(
pDIStruct
->
hDC
,
&
pDIStruct
->
rcItem
,(
HBRUSH
)
crWin
);
}
/* Do not indent item
if drawing in the edit of the combo
*/
/* Do not indent item
if drawing in the edit of the combo
*/
if
(
pDIStruct
->
itemState
&
ODS_COMBOBOXEDIT
)
{
iIndentation
=
0
;
...
...
@@ -1905,11 +1908,13 @@ static LRESULT FILEDLG95_LOOKIN_DrawItem(LPDRAWITEMSTRUCT pDIStruct)
rectIcon
.
bottom
=
pDIStruct
->
rcItem
.
bottom
;
/* Initialise the text display area */
GetTextMetricsA
(
pDIStruct
->
hDC
,
&
tm
);
rectText
.
left
=
rectIcon
.
right
;
rectText
.
top
=
pDIStruct
->
rcItem
.
top
+
YTEXTOFFSET
;
rectText
.
top
=
(
pDIStruct
->
rcItem
.
top
+
pDIStruct
->
rcItem
.
bottom
-
tm
.
tmHeight
)
/
2
;
rectText
.
right
=
pDIStruct
->
rcItem
.
right
+
XTEXTOFFSET
;
rectText
.
bottom
=
pDIStruct
->
rcItem
.
bottom
;
rectText
.
bottom
=
(
pDIStruct
->
rcItem
.
top
+
pDIStruct
->
rcItem
.
bottom
+
tm
.
tmHeight
)
/
2
;
/* Draw the icon from the image list */
COMDLG32_ImageList_Draw
(
ilItemImage
,
...
...
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