Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI layout automation #360

Merged
merged 22 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
82e56ec
Change from csc to mcs compiler
stevieb9 Aug 3, 2023
18d56a7
Removed multiple calls to `this.ClientSize`; we now only set it in th…
stevieb9 Aug 3, 2023
c31e874
Added basic framework for UI to get its config from a JSON file
stevieb9 Aug 3, 2023
4bfd550
Added initial UI config json data
stevieb9 Aug 3, 2023
413ac44
Removed all references of 'this'
stevieb9 Aug 3, 2023
f3654f4
Size of UI window is now gathered from the UI config file
stevieb9 Aug 3, 2023
b2bfcf6
Major progress getting all UI elements configuration information into…
stevieb9 Aug 3, 2023
6f3ae6e
All basic UI elements are now configured through config file
stevieb9 Aug 4, 2023
b1a43a2
Added comboboxes (select boxes) to ui JSON config
stevieb9 Aug 4, 2023
2993247
Added 'dev/generate_ui' script; reproduces the UI window layout
stevieb9 Aug 4, 2023
9613b0c
Buttons and comboboxes are dynamically created in ui simulator
stevieb9 Aug 4, 2023
7477ea4
All elements of the UI are now included in the simulator
stevieb9 Aug 4, 2023
f9ae1d8
Renamed generate_ui_matrix to ui_simulator
stevieb9 Aug 5, 2023
5cc7b5d
All buttons in UI simulator now reload the window for easy live editing
stevieb9 Aug 5, 2023
682e093
UI simulator now auto-refreshes itself on any button press
stevieb9 Aug 5, 2023
9b9f63d
Add new framework to automate the task of moving element blocks aroun…
stevieb9 Aug 5, 2023
9965783
Updated argument error handling
stevieb9 Aug 5, 2023
e7176c4
Add explanitory comments
stevieb9 Aug 5, 2023
e6d9b3e
Add ability to manipulate main window size
stevieb9 Aug 5, 2023
a2fd97a
Finished code to resize main window
stevieb9 Aug 5, 2023
480909d
Added documentation for the new UI tools and simulator
stevieb9 Aug 7, 2023
44da0a8
Updated changes with new UI tool information
stevieb9 Aug 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
Revision history for berrybrew

1.42 UNREL
-

- Added `dev/ui_simulator.pl`, a non-functioning layout simulator which on
the click of any button, reloads the window after loading in updated
config elements from the `data/ui.json` config file (closes #358)
- Added new UI layout manipulation scripts and tools
- Updated development documentation for new UI tools

1.41 2023-08-03
- Renamed `PerlOp.PerlOrphansIgnore()` to `Berrybrew.SpecialInstanceDirectories()`
Expand Down
4 changes: 2 additions & 2 deletions dev/build_staging_ui.bat
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ call perl -i.bak -ne "s/\"run_mode\"\s+:\s+\"prod\"/\"run_mode\"\t\t : \"stagin

echo "compiling UI..."

call csc^
call mcs^
src\berrybrew-ui.cs^
src\perloperations.cs^
-lib:staging^
Expand All @@ -23,4 +23,4 @@ call csc^
-r:Newtonsoft.Json.dll^
-win32icon:inc/berrybrew.ico^
-win32manifest:berrybrew.manifest^
-out:staging/berrybrew-ui.exe^
-out:staging/berrybrew-ui.exe
262 changes: 262 additions & 0 deletions dev/data/ui.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,262 @@
{
"checkbox" : {
"windowsHomedir" : {
"width" : 200,
"autosize" : true,
"location" : [
10,
295
],
"text" : "Windows homedir"
},
"powershell" : {
"width" : 200,
"location" : [
10,
235
],
"text" : "Use Powershell",
"autosize" : true
},
"warnOrphans" : {
"width" : 200,
"autosize" : true,
"text" : "Warn on orphans",
"location" : [
10,
275
]
},
"debug" : {
"location" : [
10,
215
],
"text" : "Debug",
"autosize" : true,
"width" : 200
},
"fileAssoc" : {
"width" : 200,
"autosize" : true,
"location" : [
10,
255
],
"text" : "Manage file association"
}
},
"label" : {
"currentPerl" : {
"location" : [
10,
10
],
"text" : "Current Perl: None Configured",
"index" : 1,
"name" : "BBUI",
"size" : [
159,
20
],
"tabindex" : 0,
"autosize" : true
}
},
"ui_simulator" : {
"font_size" : 11
},
"ui_object" : {
"client_size" : [
265,
325
],
"trayicon_text" : "berrybrew UI"
},
"button" : {
"perlFetch" : {
"index" : 8,
"name" : "perlFetchButton",
"text" : "Fetch",
"location" : [
10,
185
],
"size" : [
75,
23
],
"tabindex" : 1
},
"perlSwitch" : {
"size" : [
75,
23
],
"name" : "perlSwitchButton",
"index" : 3,
"tabindex" : 1,
"location" : [
139,
35
],
"text" : "Switch"
},
"perlOff" : {
"size" : [
35,
20
],
"index" : 2,
"name" : "perlOffButton",
"location" : [
215,
10
],
"text" : "Off",
"tabindex" : 1
},
"perlOpen" : {
"size" : [
45,
20
],
"tabindex" : 1,
"index" : 1,
"name" : "perlOpenButton",
"text" : "Open",
"location" : [
169,
10
]
},
"perlUse" : {
"size" : [
75,
23
],
"location" : [
139,
95
],
"text" : "Use",
"index" : 5,
"name" : "perlUseButton",
"tabindex" : 1
},
"perlInstall" : {
"size" : [
75,
23
],
"text" : "Install",
"location" : [
139,
65
],
"index" : 4,
"name" : "perlInstallButton",
"tabindex" : 1
},
"perlClone" : {
"tabindex" : 1,
"text" : "Clone",
"location" : [
139,
155
],
"name" : "perlCloneButton",
"index" : 7,
"size" : [
75,
23
]
},
"perlRemove" : {
"tabindex" : 1,
"name" : "perlRemoveButton",
"index" : 6,
"location" : [
139,
125
],
"text" : "Remove",
"size" : [
75,
23
]
}
},
"combobox" : {
"perlClone" : {
"location" : [
10,
155
],
"tabindex" : 0,
"name" : "perlCloneSelect",
"index" : 5,
"size" : [
121,
30
],
"formatting_enabled" : true
},
"perlInstall" : {
"formatting_enabled" : true,
"size" : [
121,
30
],
"location" : [
10,
65
],
"tabindex" : 0,
"index" : 2,
"name" : "perlInstallSelect"
},
"perlUse" : {
"formatting_enabled" : true,
"size" : [
121,
30
],
"index" : 3,
"name" : "perlUseSelect",
"tabindex" : 0,
"location" : [
10,
95
]
},
"perlSwitch" : {
"location" : [
10,
35
],
"name" : "perlSwitchSelect",
"index" : 1,
"size" : [
121,
30
],
"tabindex" : 0,
"formatting_enabled" : true
},
"perlRemove" : {
"size" : [
121,
30
],
"formatting_enabled" : true,
"location" : [
10,
125
],
"name" : "perlRemoveSelect",
"index" : 4,
"tabindex" : 0
}
}
}
Loading