forked from Ixiko/AHK-libs-and-classes-collection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGuiSettings.ahk
53 lines (45 loc) · 1.16 KB
/
GuiSettings.ahk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
; LintaList Include
; Purpose: Set and Toggle values for GUI (width, height and position of controls)
; Version: 1.0.3
; Date: 20170127
GuiStartupSettings:
SearchBoxWidth:=CompactWidth-30 ; Searchbox Width
YCtrl=26 ; Y pos of controls (now only custom button bar controls)
YLView=45 ; Y pos of Listview (e.g. bundle/search results)
ExtraLV=0
If (Width > CompactWidth) ; if not change
{
Yctrl=1
YLView=25
ExtraLV=20
barx:=Width-325
}
Gosub, GuiRadioAndCheckPos
VisibleRows:=Ceil(LVHeight/20) ; TODO: Calculate correct value for 20 for pagedown/pageup as is just a rough guess
Return
GuiToggleSettings:
If (Width < WideWidth)
{
Width:=WideWidth
Height:=WideHeight
Yctrl=1
YLView=25
ExtraLV=20
barx:=Width-325 ; position of buttonbar
}
Else
{
Width:=CompactWidth
Height:=CompactHeight
Yctrl=26
YLView=50
ExtraLV=-5
barx:=Width-329 ; position of buttonbar
}
Gosub, GuiRadioAndCheckPos
Return
GuiRadioAndCheckPos:
LVWidth:=Width-2 ; Listview Width
LVHeight:=Height-PreviewHeight-70+ExtraLV ; Listview Height
YPosPreview:=Height-PreviewHeight-22 ;
Return