glimmer-dsl-tk 0.0.56 → 0.0.57

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 951b8e62423c7092e9d3d34c25ea583cab0e5195b84f2553a47f36bcce2703c3
4
- data.tar.gz: 35017367771d0668aa955d0edc9776fb5d5072ffdd1b63519f920d1edc73b70f
3
+ metadata.gz: 0e0e1ed1843f904d42892c7fe2546383717da65d7cfd0690b1b66101a5b68576
4
+ data.tar.gz: af96af00f8b06606ac584ab14d5d8d360977a58ec354053a0826edc470c0d57f
5
5
  SHA512:
6
- metadata.gz: 78bd1d1296b43903d306daa043cbaa21f4b898703c43021387c32ed4e96019ebcff3690ac2a6e70e810ea7ccc70181df3ccefb5412e9fcebaecd9c762f14c511
7
- data.tar.gz: 3aa1e66860f386a919a63c141023d20baba0e7aaff885560d9433a817baa9e930eed812242f2a203775254eabbb4f50fb29ab905f40223a0697c7600c58c9e02
6
+ metadata.gz: '01787afce29bc0b1d4656b8ab646f0eb4501a8b8feb23979ad99970f6e5d6bb75d5945bb0b9a9a91cdb34f36d6bdf9226ec3e3aa60368206cd98b40daa2cd0a1'
7
+ data.tar.gz: 677f8d13ab20b7857c613167d1d21eed0dec3f1b19a8b29ba4b4cec49545186446c2c9bacbaf9e0741c16ceb2d20e60136c482dc6e78783d8b1d435ed4239be8
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 0.0.57
4
+
5
+ - Hello, Theme! sample
6
+
3
7
  ## 0.0.56
4
8
 
5
9
  - Hello, Progressbar! sample
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for Tk 0.0.56
1
+ # [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 />](https://github.com/AndyObtiva/glimmer) Glimmer DSL for Tk 0.0.57
2
2
  ## Ruby Tk Desktop Development GUI Library
3
3
  [![Gem Version](https://badge.fury.io/rb/glimmer-dsl-tk.svg)](http://badge.fury.io/rb/glimmer-dsl-tk)
4
4
  [![Ruby](https://github.com/AndyObtiva/glimmer-dsl-tk/actions/workflows/ruby.yml/badge.svg)](https://github.com/AndyObtiva/glimmer-dsl-tk/actions/workflows/ruby.yml)
@@ -135,6 +135,7 @@ DSL | Platforms | Native? | Vector Graphics? | Pros | Cons | Prereqs
135
135
  - [Hello, Labelframe!](#hello-labelframe)
136
136
  - [Hello, Scale!](#hello-scale)
137
137
  - [Hello, Progressbar!](#hello-progressbar)
138
+ - [Hello, Theme!](#hello-theme)
138
139
  - [Applications](#applications)
139
140
  - [Glimmer Tk Calculator](#glimmer-tk-calculator)
140
141
  - [Y3network Ruby UI](#y3network-ruby-ui)
@@ -194,7 +195,7 @@ gem install glimmer-dsl-tk
194
195
 
195
196
  Add the following to `Gemfile`:
196
197
  ```
197
- gem 'glimmer-dsl-tk', '0.0.56'
198
+ gem 'glimmer-dsl-tk', '0.0.57'
198
199
  ```
199
200
 
200
201
  And, then run:
@@ -4118,6 +4119,143 @@ Glimmer app:
4118
4119
 
4119
4120
  ![glimmer dsl tk screenshot sample hello progressbar gif](images/glimmer-dsl-tk-screenshot-sample-hello-progressbar.gif)
4120
4121
 
4122
+ ### Hello, Theme!
4123
+
4124
+ Glimmer code (from [samples/hello/hello_theme.rb](samples/hello/hello_theme.rb)):
4125
+
4126
+ ```ruby
4127
+ require 'glimmer-dsl-tk'
4128
+
4129
+ class HelloTheme
4130
+ include Glimmer
4131
+
4132
+ def launch
4133
+ root {
4134
+ title 'Hello, Theme!'
4135
+
4136
+ labelframe {
4137
+ text 'Theme'
4138
+
4139
+ combobox { |cb|
4140
+ readonly true
4141
+ values ::Tk::Tile::Style.theme_names
4142
+ text 'aqua'
4143
+
4144
+ on('<ComboboxSelected>') do
4145
+ ::Tk::Tile::Style.theme_use cb.tk.textvariable.value
4146
+ end
4147
+ }
4148
+ }
4149
+
4150
+ labelframe {
4151
+ text 'Widgets'
4152
+
4153
+ notebook {
4154
+ frame(text: 'One') {
4155
+ label {
4156
+ text 'label'
4157
+ }
4158
+
4159
+ entry {
4160
+ text 'entry'
4161
+ }
4162
+
4163
+ entry {
4164
+ text 'password'
4165
+ show '*'
4166
+ }
4167
+
4168
+ spinbox {
4169
+ text '100'
4170
+ }
4171
+ }
4172
+
4173
+ frame(text: 'Two') {
4174
+ button {
4175
+ text 'button'
4176
+ }
4177
+
4178
+ checkbutton {
4179
+ text 'checkbutton'
4180
+ }
4181
+
4182
+ radiobutton {
4183
+ text 'radiobutton'
4184
+ }
4185
+ }
4186
+
4187
+ frame(text: 'Three') {
4188
+ scale {
4189
+ orient 'horizontal'
4190
+ length 200
4191
+ from 0.0
4192
+ to 100.0
4193
+ value 50
4194
+ }
4195
+
4196
+ progressbar {
4197
+ orient 'horizontal'
4198
+ length 200
4199
+ mode 'determinate'
4200
+ maximum 100
4201
+ value 50
4202
+ }
4203
+
4204
+ progressbar {
4205
+ orient 'vertical'
4206
+ length 100
4207
+ mode 'determinate'
4208
+ maximum 100
4209
+ value 50
4210
+ }
4211
+ }
4212
+ }
4213
+ }
4214
+ }.open
4215
+ end
4216
+ end
4217
+
4218
+ HelloTheme.new.launch
4219
+ ```
4220
+
4221
+ Run with [glimmer-dsl-tk](https://rubygems.org/gems/glimmer-dsl-tk) gem installed:
4222
+
4223
+ ```
4224
+ ruby -r glimmer-dsl-tk -e "require 'samples/hello/hello_theme'"
4225
+ ```
4226
+
4227
+ Alternatively, run from cloned project without [glimmer-dsl-tk](https://rubygems.org/gems/glimmer-dsl-tk) gem installed:
4228
+
4229
+ ```
4230
+ ruby -r ./lib/glimmer-dsl-tk.rb samples/hello/hello_theme.rb
4231
+ ```
4232
+
4233
+ Glimmer app:
4234
+
4235
+ Aqua Theme Tab One
4236
+
4237
+ ![glimmer dsl tk screenshot sample hello theme aqua 1](images/glimmer-dsl-tk-screenshot-sample-hello-theme-aqua-tab-one.png)
4238
+
4239
+ Aqua Theme Tab Two
4240
+
4241
+ ![glimmer dsl tk screenshot sample hello theme aqua 2](images/glimmer-dsl-tk-screenshot-sample-hello-theme-aqua-tab-two.png)
4242
+
4243
+ Aqua Theme Tab Three
4244
+
4245
+ ![glimmer dsl tk screenshot sample hello theme aqua 3](images/glimmer-dsl-tk-screenshot-sample-hello-theme-aqua-tab-three.png)
4246
+
4247
+ Clam Theme Tab One
4248
+
4249
+ ![glimmer dsl tk screenshot sample hello theme clam 1](images/glimmer-dsl-tk-screenshot-sample-hello-theme-clam-tab-one.png)
4250
+
4251
+ Clam Theme Tab Two
4252
+
4253
+ ![glimmer dsl tk screenshot sample hello theme clam 2](images/glimmer-dsl-tk-screenshot-sample-hello-theme-clam-tab-two.png)
4254
+
4255
+ Clam Theme Tab Three
4256
+
4257
+ ![glimmer dsl tk screenshot sample hello theme clam 3](images/glimmer-dsl-tk-screenshot-sample-hello-theme-clam-tab-three.png)
4258
+
4121
4259
  ## Applications
4122
4260
 
4123
4261
  ### Glimmer Tk Calculator
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.56
1
+ 0.0.57
Binary file
@@ -0,0 +1,113 @@
1
+ # Copyright (c) 2020-2022 Andy Maleh
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining
4
+ # a copy of this software and associated documentation files (the
5
+ # "Software"), to deal in the Software without restriction, including
6
+ # without limitation the rights to use, copy, modify, merge, publish,
7
+ # distribute, sublicense, and/or sell copies of the Software, and to
8
+ # permit persons to whom the Software is furnished to do so, subject to
9
+ # the following conditions:
10
+ #
11
+ # The above copyright notice and this permission notice shall be
12
+ # included in all copies or substantial portions of the Software.
13
+ #
14
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
+
22
+ require 'glimmer-dsl-tk'
23
+
24
+ class HelloTheme
25
+ include Glimmer
26
+
27
+ def launch
28
+ root {
29
+ title 'Hello, Theme!'
30
+
31
+ labelframe {
32
+ text 'Theme'
33
+
34
+ combobox { |cb|
35
+ readonly true
36
+ values ::Tk::Tile::Style.theme_names
37
+ text 'aqua'
38
+
39
+ on('<ComboboxSelected>') do
40
+ ::Tk::Tile::Style.theme_use cb.tk.textvariable.value
41
+ end
42
+ }
43
+ }
44
+
45
+ labelframe {
46
+ text 'Widgets'
47
+
48
+ notebook {
49
+ frame(text: 'One') {
50
+ label {
51
+ text 'label'
52
+ }
53
+
54
+ entry {
55
+ text 'entry'
56
+ }
57
+
58
+ entry {
59
+ text 'password'
60
+ show '*'
61
+ }
62
+
63
+ spinbox {
64
+ text '100'
65
+ }
66
+ }
67
+
68
+ frame(text: 'Two') {
69
+ button {
70
+ text 'button'
71
+ }
72
+
73
+ checkbutton {
74
+ text 'checkbutton'
75
+ }
76
+
77
+ radiobutton {
78
+ text 'radiobutton'
79
+ }
80
+ }
81
+
82
+ frame(text: 'Three') {
83
+ scale {
84
+ orient 'horizontal'
85
+ length 200
86
+ from 0.0
87
+ to 100.0
88
+ value 50
89
+ }
90
+
91
+ progressbar {
92
+ orient 'horizontal'
93
+ length 200
94
+ mode 'determinate'
95
+ maximum 100
96
+ value 50
97
+ }
98
+
99
+ progressbar {
100
+ orient 'vertical'
101
+ length 100
102
+ mode 'determinate'
103
+ maximum 100
104
+ value 50
105
+ }
106
+ }
107
+ }
108
+ }
109
+ }.open
110
+ end
111
+ end
112
+
113
+ HelloTheme.new.launch
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer-dsl-tk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.56
4
+ version: 0.0.57
5
5
  platform: ruby
6
6
  authors:
7
7
  - AndyMaleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-26 00:00:00.000000000 Z
11
+ date: 2022-03-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: glimmer
@@ -259,6 +259,7 @@ files:
259
259
  - samples/hello/hello_separator.rb
260
260
  - samples/hello/hello_spinbox.rb
261
261
  - samples/hello/hello_text.rb
262
+ - samples/hello/hello_theme.rb
262
263
  - samples/hello/hello_toplevel.rb
263
264
  - samples/hello/hello_world.rb
264
265
  - samples/hello/images/align-center.png