samples/elaborate/meta_sample.rb in glimmer-dsl-swt-4.17.4.2 vs samples/elaborate/meta_sample.rb in glimmer-dsl-swt-4.17.5.0
- old
+ new
@@ -98,54 +98,54 @@
class MetaSampleApplication
include Glimmer
def launch
shell {
+ minimum_size 1280, 768
text 'Glimmer Meta-Sample (The Sample of Samples)'
on_swt_show {
SampleDirectory.selected_sample = SampleDirectory.all_samples.first
}
sash_form {
composite {
grid_layout 1, false
-
- scrolled_composite {
+
+ expand_bar {
layout_data(:fill, :fill, true, true)
+ font height: 30
- composite {
- SampleDirectory.sample_directories.each { |sample_directory|
- group {
- layout_data(:fill, :fill, true, true)
- grid_layout 2, false
- text "#{sample_directory.name} Samples"
- font height: 30
-
- sample_directory.samples.each { |sample|
- label_radio = radio {
- selection bind(sample, :selected)
+ SampleDirectory.sample_directories.each { |sample_directory|
+ expand_item {
+ layout_data(:fill, :fill, true, true)
+ grid_layout 2, false
+ text "#{sample_directory.name} Samples"
+
+ sample_directory.samples.each { |sample|
+ label_radio = radio {
+ selection bind(sample, :selected)
+ }
+ label {
+ layout_data :fill, :center, true, false
+ text sample.name
+ font height: 24
+
+ on_mouse_up {
+ sample.selected = true
}
- label {
- text sample.name
- font height: 30
-
- on_mouse_up {
- sample.selected = true
- }
- }
}
}
}
}
}
button {
- layout_data(:center, :center, false, false) {
- height_hint 150
+ layout_data(:fill, :center, true, false) {
+ height_hint 120
}
text 'Launch Sample'
- font height: 45
+ font height: 30
on_widget_selected {
SampleDirectory.selected_sample.launch
}
}
}