glimmer-dsl-swt 4.22.2.5 → 4.22.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +49 -9
- data/VERSION +1 -1
- data/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md +33 -31
- data/glimmer-dsl-swt.gemspec +0 -0
- data/lib/glimmer/swt/custom/shape.rb +6 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac45c3222d87e368de1345985c6300a82774a9380f5bf6f0741ad652e60adc1e
|
4
|
+
data.tar.gz: a4cad66af57489c224ecce5d4609d8b09e422d56b0aed463d6215383d69fcd3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c5b1663e2f9cfaa118fdc4ec02064d2472bc92daf4a6d6012f1a7a1f98401cacd6b7a1009e5daa91d75b4626e431968be6fb2071c6c7dc25ff0359a481e5f41
|
7
|
+
data.tar.gz: d81508da3bbfd45f329f8c63187cf6babd11b719e5dfb668fd1a0ace62258143e168ab7b2b97d1e61a0aadaba657edfc7fcba4c1b71201332de8ff54e5686db6
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## 4.22.2.6
|
4
|
+
|
5
|
+
- Fix issue whereby updating `string` property on the `text`/`string` shape does not trigger a redraw on the shape because the text dimensions remained the same despite the change of content (e.g. switching from `string` content of letter `A` to `S` results in the same dimensions)
|
6
|
+
- Canvas Shape DSL graduated from Beta to Final
|
7
|
+
|
3
8
|
## 4.22.2.5
|
4
9
|
|
5
10
|
- Update all samples to match the [GLIMMER_STYLE_GUIDE.md](/docs/reference/GLIMMER_STYLE_GUIDE.md)
|
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 SWT 4.22.2.
|
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 SWT 4.22.2.6
|
2
2
|
## JRuby Desktop Development GUI Framework
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/glimmer-dsl-swt.svg)](http://badge.fury.io/rb/glimmer-dsl-swt)
|
4
4
|
[![Travis CI](https://travis-ci.com/AndyObtiva/glimmer-dsl-swt.svg?branch=master)](https://travis-ci.com/github/AndyObtiva/glimmer-dsl-swt)
|
@@ -17,7 +17,7 @@ Featured in JRuby Cookbook](http://shop.oreilly.com/product/9780596519650.do) an
|
|
17
17
|
|
18
18
|
![Eclipse SWT RCP NASA Mars Rover](/images/glimmer-eclipse-swt-rcp-nasa-mars-rover.png)
|
19
19
|
|
20
|
-
[Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.22.2.
|
20
|
+
[Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) 4.22.2.6 includes [SWT 4.22](https://download.eclipse.org/eclipse/downloads/drops4/R-4.22-202111241800/), which was released on November 24, 2021. Gem version numbers are in sync with the SWT library versions. The first two digits represent the SWT version number. The last two digits represent the minor and patch versions of Glimmer DSL for SWT.
|
21
21
|
|
22
22
|
**Starting in version 4.20.0.0, [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) comes with the new [***Shine***](/docs/reference/GLIMMER_GUI_DSL_SYNTAX.md#shine) syntax** for highly intuitive and visually expressive View/Model Attribute Mapping, relying on `<=>` for bidirectional (two-way) data-binding and `<=` for unidirectional (one-way) data-binding, providing an alternative to the `bind` keyword.
|
23
23
|
|
@@ -27,9 +27,9 @@ Please help make [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt
|
|
27
27
|
DSL | Platforms | Native? | Vector Graphics? | Pros | Cons | Prereqs
|
28
28
|
----|-----------|---------|------------------|------|------|--------
|
29
29
|
[Glimmer DSL for SWT (JRuby Desktop Development GUI Framework)](https://github.com/AndyObtiva/glimmer-dsl-swt) | Mac / Windows / Linux | Yes | Yes (Canvas Shape DSL) | Very Mature / Scaffolding / Native Executable Packaging / Custom Widgets | Slow JRuby Startup Time / Heavy Memory Footprint | Java / JRuby
|
30
|
-
[Glimmer DSL for Opal (Pure Ruby Web GUI and Auto-Webifier of Desktop Apps)](https://github.com/AndyObtiva/glimmer-dsl-opal) | All Web Browsers | No | Yes (Canvas Shape DSL) | Simpler than All JavaScript Technologies / Auto-Webify Desktop Apps | Setup Process /
|
30
|
+
[Glimmer DSL for Opal (Pure Ruby Web GUI and Auto-Webifier of Desktop Apps)](https://github.com/AndyObtiva/glimmer-dsl-opal) | All Web Browsers | No | Yes (Canvas Shape DSL) | Simpler than All JavaScript Technologies / Auto-Webify Desktop Apps | Setup Process / Incomplete Alpha | Rails
|
31
31
|
[Glimmer DSL for LibUI (Prerequisite-Free Ruby Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-libui) | Mac / Windows / Linux | Yes | Yes (Area API) | Fast Startup Time / Light Memory Footprint | LibUI is an Incomplete Mid-Alpha Only | None Other Than MRI Ruby
|
32
|
-
[Glimmer DSL for Tk (
|
32
|
+
[Glimmer DSL for Tk (Ruby Tk Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-tk) | Mac / Windows / Linux | Some Native-Themed Widgets (Not Truly Native) | Yes (Canvas) | Fast Startup Time / Light Memory Footprint | Widgets Do Not Look Truly Native, Espcially on Linux | ActiveTcl / MRI Ruby
|
33
33
|
[Glimmer DSL for GTK (Ruby-GNOME Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-gtk) | Mac / Windows / Linux | Only on Linux | Yes (Cairo) | Complete Access to GNOME Features on Linux (Forte) | Not Native on Mac and Windows | None Other Than MRI Ruby on Linux / Brew Packages on Mac / MSYS & MING Toolchains on Windows / MRI Ruby
|
34
34
|
[Glimmer DSL for FX (FOX Toolkit Ruby Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-fx) | Mac (requires XQuartz) / Windows / Linux | No | Yes (Canvas) | No Prerequisites on Windows (Forte Since Binaries Are Included Out of The Box) | Widgets Do Not Look Native / Mac Usage Obtrusively Starts XQuartz | None Other Than MRI Ruby on Windows / XQuarts on Mac / MRI Ruby
|
35
35
|
[Glimmer DSL for JFX (JRuby JavaFX Desktop Development GUI Library)](https://github.com/AndyObtiva/glimmer-dsl-jfx) | Mac / Windows / Linux | No | Yes (javafx.scene.shape and javafx.scene.canvas) | Rich in Custom Widgets | Slow JRuby Startup Time / Heavy Memory Footprint / Widgets Do Not Look Native | Java / JRuby / JavaFX SDK
|
@@ -331,7 +331,7 @@ jgem install glimmer-dsl-swt
|
|
331
331
|
|
332
332
|
Or this command if you want a specific version:
|
333
333
|
```
|
334
|
-
jgem install glimmer-dsl-swt -v 4.22.2.
|
334
|
+
jgem install glimmer-dsl-swt -v 4.22.2.6
|
335
335
|
```
|
336
336
|
|
337
337
|
`jgem` is JRuby's version of `gem` command.
|
@@ -359,7 +359,7 @@ Note: if you're using activerecord or activesupport, keep in mind that Glimmer u
|
|
359
359
|
|
360
360
|
Add the following to `Gemfile`:
|
361
361
|
```
|
362
|
-
gem 'glimmer-dsl-swt', '~> 4.22.2.
|
362
|
+
gem 'glimmer-dsl-swt', '~> 4.22.2.6'
|
363
363
|
```
|
364
364
|
|
365
365
|
And, then run:
|
@@ -382,7 +382,7 @@ glimmer
|
|
382
382
|
```
|
383
383
|
|
384
384
|
```
|
385
|
-
Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.22.2.
|
385
|
+
Glimmer (JRuby Desktop Development GUI Framework) - JRuby Gem: glimmer-dsl-swt v4.22.2.6
|
386
386
|
|
387
387
|
Usage: glimmer [--bundler] [--pd] [--quiet] [--debug] [--log-level=VALUE] [[ENV_VAR=VALUE]...] [[-jruby-option]...] (application.rb or task[task_args]) [[application2.rb]...]
|
388
388
|
|
@@ -459,13 +459,15 @@ In a nutshell, the Glimmer GUI DSL syntax consists mainly of:
|
|
459
459
|
|
460
460
|
1. Keywords
|
461
461
|
|
462
|
+
Widgets are declared with keywords denoting their name in underscored format.
|
463
|
+
|
462
464
|
Example of a keyword representing a table widget:
|
463
465
|
|
464
466
|
```ruby
|
465
467
|
table
|
466
468
|
```
|
467
469
|
|
468
|
-
|
470
|
+
Widgets may optionally receive symbol-style/args within parentheses (otherwise, when there are no style/args, the parentheses are left out).
|
469
471
|
|
470
472
|
Example of a multi-line selection table widget:
|
471
473
|
|
@@ -473,7 +475,9 @@ Example of a multi-line selection table widget:
|
|
473
475
|
table(:multi)
|
474
476
|
```
|
475
477
|
|
476
|
-
|
478
|
+
2. Content/Properties
|
479
|
+
|
480
|
+
Widget content is always housed within a curly-brace (`{}`) style block.
|
477
481
|
|
478
482
|
Example of a multi-line selection table widget with a table column as content that has a header `text` property as 'Name'.
|
479
483
|
|
@@ -485,6 +489,37 @@ table(:multi) {
|
|
485
489
|
}
|
486
490
|
```
|
487
491
|
|
492
|
+
3. Listeners
|
493
|
+
|
494
|
+
Listeners embody the [Observer Design Pattern](https://en.wikipedia.org/wiki/Observer_pattern) and always start with `on_` followed by an event name (e.g. `on_widget_selected`). Also, they are an exception to Glimmer's syntax that requires a `do; end` style block to clearly demarcate as logic as opposed to View syntax.
|
495
|
+
|
496
|
+
Example of a button widget with a `text` property and an `on_widget_selected` listener.
|
497
|
+
|
498
|
+
```ruby
|
499
|
+
button {
|
500
|
+
text 'Click'
|
501
|
+
|
502
|
+
on_widget_selected do
|
503
|
+
message_box {
|
504
|
+
text 'Clicked'
|
505
|
+
message 'Thank you for clicking!'
|
506
|
+
}.open
|
507
|
+
end
|
508
|
+
}
|
509
|
+
```
|
510
|
+
|
511
|
+
4. Methods
|
512
|
+
|
513
|
+
Widgets have methods that invoke operations on them. Sometimes, they are required to be called in order to display the widgets (like the `open` method on `shell` and `message_box`)
|
514
|
+
|
515
|
+
Example of a shell with a `text` property and an invoked `open` method operation.
|
516
|
+
|
517
|
+
```ruby
|
518
|
+
shell {
|
519
|
+
text 'Hello, World!'
|
520
|
+
}.open
|
521
|
+
```
|
522
|
+
|
488
523
|
If you need more widgets, you can check out the [Nebula Project](https://github.com/AndyObtiva/glimmer-cw-nebula) (50+ enterprise-grade custom widgets)
|
489
524
|
|
490
525
|
Learn more at:
|
@@ -530,10 +565,14 @@ If you have a Glimmer app you would like referenced here, please mention in a Pu
|
|
530
565
|
|
531
566
|
### Are We There Yet?
|
532
567
|
|
568
|
+
This [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) application connects to a database using [ActiveRecord](https://rubygems.org/gems/activerecord).
|
569
|
+
|
533
570
|
[<img alt="Are We There Yet Logo" src="https://raw.githubusercontent.com/AndyObtiva/are-we-there-yet/master/are-we-there-yet-logo.svg" width="40" />Are We There Yet?](https://github.com/AndyObtiva/are-we-there-yet): A tool that helps you learn when your small projects will finish
|
534
571
|
|
535
572
|
### Garderie Rainbow Daily Agenda
|
536
573
|
|
574
|
+
This [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) application connects to a [Rails](https://rubyonrails.org/) server to submit an application.
|
575
|
+
|
537
576
|
[<img alt="Garderie Rainbow Daily Agenda Logo" src="https://github.com/AndyObtiva/garderie_rainbow_daily_agenda/raw/master/images/garderie_rainbow_daily_agenda_logo.png" width="40" />Garderie Rainbow Daily Agenda](https://github.com/AndyObtiva/garderie_rainbow_daily_agenda): A child nursery daily agenda reporting desktop app
|
538
577
|
|
539
578
|
### Glimmer Gab
|
@@ -597,6 +636,7 @@ Learn more by reading the [GPG](https://github.com/AndyObtiva/glimmer/blob/maste
|
|
597
636
|
|
598
637
|
## Resources
|
599
638
|
|
639
|
+
* [Glimmer DSL for SWT Video Tutorials](https://andymaleh.blogspot.com/search/label/Tutorial+SWT)
|
600
640
|
* [Code Master Blog](http://andymaleh.blogspot.com/search/label/Glimmer)
|
601
641
|
* [JRuby Cookbook by Justin Edelson & Henry Liu](http://shop.oreilly.com/product/9780596519650.do)
|
602
642
|
* [InfoQ Article](http://www.infoq.com/news/2008/02/glimmer-jruby-swt)
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
4.22.2.
|
1
|
+
4.22.2.6
|
@@ -1736,8 +1736,6 @@ https://help.eclipse.org/2019-12/nftopic/org.eclipse.platform.doc.isv/reference/
|
|
1736
1736
|
|
1737
1737
|
### Canvas Shape DSL
|
1738
1738
|
|
1739
|
-
**(BETA FEATURE)**
|
1740
|
-
|
1741
1739
|
While other GUI toolkits only offer a way to draw graphics imperatively (e.g. draw_arc, draw_rectangle, move_to, line_to, etc...), Glimmer DSL for SWT breaks away from the mold by enabling software engineers to draw graphics declaratively. Simply declare all the shapes you want to see with their attributes, like background/foreground colors, and Glimmer DSL for SWT takes care of the rest, painting graphics on a blank `canvas` widget or amending/decorating an existing widget. This is accomplished through the Canvas Shape DSL, a sub-DSL of the Glimmer GUI DSL, which makes it possible to draw graphics declaratively with very understandable and maintainable syntax. Still, for the rare cases where imperative logic is needed, Glimmer DSL for SWT supports imperative painting of graphics through direct usage of SWT.
|
1742
1740
|
|
1743
1741
|
![Canvas Shape DSL Line](/images/glimmer-canvas-shape-dsl-line.png)
|
@@ -2723,8 +2721,6 @@ Check [Hello, Canvas!](/docs/reference/GLIMMER_SAMPLES.md#hello-canvas) for an e
|
|
2723
2721
|
|
2724
2722
|
#### Pixel Graphics
|
2725
2723
|
|
2726
|
-
**(BETA FEATURE)**
|
2727
|
-
|
2728
2724
|
If you need to paint pixel graphics, use the optimized `pixel` keyword alternative to `point`, which takes foreground as a hash argument and bypasses the [Glimmer DSL Engine chain of responsibility](https://github.com/AndyObtiva/glimmer#dsl-engine), thus rendering faster when having very large pixel counts.
|
2729
2725
|
|
2730
2726
|
Example (you may copy/paste in [`girb`](GLIMMER_GIRB.md)):
|
@@ -2905,8 +2901,6 @@ As they say, there are many ways to skin a cat! This is in line with the Ruby wa
|
|
2905
2901
|
|
2906
2902
|
### Canvas Path DSL
|
2907
2903
|
|
2908
|
-
**(BETA FEATURE)**
|
2909
|
-
|
2910
2904
|
Unlike common imperative GUI graphing toolkits, Glimmer enables declarative rendering of paths with the new Canvas Path DSL (Early Alpha) via the new `path { }` keyword and by nesting one of the following path segment keywords underneath:
|
2911
2905
|
- `point(x1, y1)`: renders a Point (Dot) as part of a path.
|
2912
2906
|
- `line(x1, y1, x2=nil, y2=nil)`: renders a Line as part of a path. If you drop x2, y2, it joins to the previous point automatically. You may repeat for a series of lines forming a curve.
|
@@ -2951,8 +2945,6 @@ Every path segment object (mixing in [`Glimmer::SWT::Custom::PathSegment`](/lib/
|
|
2951
2945
|
|
2952
2946
|
### Canvas Transform DSL
|
2953
2947
|
|
2954
|
-
**(BETA FEATURE)**
|
2955
|
-
|
2956
2948
|
The transform DSL builds [org.eclipse.swt.graphics.Transform](https://help.eclipse.org/2020-12/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/graphics/Transform.html) objects with a nice declarative syntax.
|
2957
2949
|
|
2958
2950
|
`transform` keyword builds a `Transform` object. It optionally takes the transformation matrix elements: (m11, m12, m21, m22, dx, dy)
|
@@ -3811,7 +3803,7 @@ Custom widgets are brand new Glimmer DSL keywords that represent aggregates of e
|
|
3811
3803
|
|
3812
3804
|
You can find out about [published Glimmer Custom Widgets](https://github.com/AndyObtiva/glimmer-dsl-swt#gem-listing) by running the `glimmer list:gems:customwidget` command
|
3813
3805
|
|
3814
|
-
Glimmer supports
|
3806
|
+
Glimmer supports two ways of creating custom widgets with minimal code:
|
3815
3807
|
1. Method-based Custom Widgets (for single-view-internal reuse): Extract a method containing Glimmer DSL widget syntax. Useful for quickly eliminating redundant code within a single view.
|
3816
3808
|
2. Class-based Custom Widgets (for multiple-view-external reuse): Create a class that includes the `Glimmer::UI::CustomWidget` module and Glimmer DSL widget syntax in a `body {}` block. This will automatically extend Glimmer's DSL syntax with an underscored lowercase keyword matching the class name by convention. Useful in making a custom widget available in many views.
|
3817
3809
|
|
@@ -4429,9 +4421,11 @@ Also, you may check out [Hello, Custom Widget!](/docs/reference/GLIMMER_SAMPLES.
|
|
4429
4421
|
|
4430
4422
|
### Custom Shells
|
4431
4423
|
|
4432
|
-
Custom
|
4424
|
+
Custom shell is a kind of a [custom widget](#custom-widgets) that has `shell` (window) as the body root widget. It can be used to represent an application or a reusable window that may be opened/hidden/closed independently of the main application.
|
4425
|
+
|
4426
|
+
Except in the case of small demos, it is always recommended to build [Glimmer DSL for SWT](https://rubygems.org/gems/glimmer-dsl-swt) applications as custom shells.
|
4433
4427
|
|
4434
|
-
|
4428
|
+
Custom shells may also be chained in a wizard fashion in some cases.
|
4435
4429
|
|
4436
4430
|
You can find out about [published Glimmer Custom Shells](https://github.com/AndyObtiva/glimmer-dsl-swt#gem-listing) by running the `glimmer list:gems:customshell` command
|
4437
4431
|
|
@@ -4468,33 +4462,41 @@ class WizardStep
|
|
4468
4462
|
}
|
4469
4463
|
end
|
4470
4464
|
|
4471
|
-
|
4472
|
-
|
4473
|
-
|
4474
|
-
|
4475
|
-
|
4476
|
-
|
4477
|
-
|
4478
|
-
|
4479
|
-
|
4465
|
+
class Wizard
|
4466
|
+
include Glimmer::UI::CustomShell
|
4467
|
+
|
4468
|
+
body {
|
4469
|
+
shell { |app_shell|
|
4470
|
+
text "Wizard"
|
4471
|
+
minimum_size 200, 100
|
4472
|
+
@current_step_number = 1
|
4473
|
+
@wizard_steps = 5.times.map { |n|
|
4474
|
+
wizard_step(number: n+1, step_count: 5) {
|
4475
|
+
on_swt_hide do
|
4476
|
+
if @current_step_number < 5
|
4477
|
+
@current_step_number += 1
|
4478
|
+
app_shell.hide
|
4479
|
+
@wizard_steps[@current_step_number - 1].open
|
4480
|
+
end
|
4481
|
+
end
|
4482
|
+
}
|
4483
|
+
}
|
4484
|
+
button {
|
4485
|
+
text "Start"
|
4486
|
+
font height: 40
|
4487
|
+
on_widget_selected do
|
4480
4488
|
app_shell.hide
|
4481
4489
|
@wizard_steps[@current_step_number - 1].open
|
4482
4490
|
end
|
4483
|
-
|
4491
|
+
}
|
4484
4492
|
}
|
4485
4493
|
}
|
4486
|
-
|
4487
|
-
|
4488
|
-
|
4489
|
-
on_widget_selected do
|
4490
|
-
app_shell.hide
|
4491
|
-
@wizard_steps[@current_step_number - 1].open
|
4492
|
-
end
|
4493
|
-
}
|
4494
|
-
}.open
|
4494
|
+
end
|
4495
|
+
|
4496
|
+
Wizard.launch
|
4495
4497
|
```
|
4496
4498
|
|
4497
|
-
If you use a Custom Shell as the top-level app shell, you may invoke the class method `.launch` instead to avoid building an app class yourself or including Glimmer into the top-level namespace (e.g. `Tetris.launch` instead of `include Glimmer; tetris.open`)
|
4499
|
+
If you use a Custom Shell as the top-level app shell, you may invoke the class method `.launch` instead of `open` to avoid building an app class yourself or including Glimmer into the top-level namespace (e.g. `Tetris.launch` instead of `include Glimmer; tetris.open`)
|
4498
4500
|
|
4499
4501
|
You may check out [Hello, Custom Shell!](/docs/reference/GLIMMER_SAMPLES.md#hello-custom-shell) for another example.
|
4500
4502
|
|
data/glimmer-dsl-swt.gemspec
CHANGED
Binary file
|
@@ -1026,14 +1026,17 @@ module Glimmer
|
|
1026
1026
|
|
1027
1027
|
def ensure_extent(paint_event)
|
1028
1028
|
old_extent = @extent
|
1029
|
+
old_extent_args = @extent_args
|
1029
1030
|
if ['text', 'string'].include?(@name)
|
1030
1031
|
extent_args = [string]
|
1031
1032
|
extent_flags = SWTProxy[:draw_transparent, :draw_delimiter] if current_parameter_name?(:is_transparent) && is_transparent
|
1032
1033
|
extent_flags = flags if current_parameter_name?(:flags)
|
1033
1034
|
extent_args << extent_flags unless extent_flags.nil?
|
1034
1035
|
self.extent = paint_event.gc.send("#{@name}Extent", *extent_args)
|
1036
|
+
@extent_args = extent_args
|
1035
1037
|
end
|
1036
|
-
|
1038
|
+
# comparing extent_args with old ones ensures that if content changes, calculated_args_changed! is called
|
1039
|
+
if !@extent.nil? && (old_extent&.x != @extent&.x || old_extent&.y != @extent&.y || @extent_args != old_extent_args)
|
1037
1040
|
calculated_args_changed!
|
1038
1041
|
parent.calculated_args_changed_for_defaults! if parent.is_a?(Shape)
|
1039
1042
|
end
|
@@ -1101,10 +1104,11 @@ module Glimmer
|
|
1101
1104
|
default_x? && x_delta,
|
1102
1105
|
default_y? && default_y,
|
1103
1106
|
default_y? && y_delta,
|
1107
|
+
(['text', 'string'].include?(@name) && string),
|
1104
1108
|
]
|
1105
1109
|
if calculated_args_dependencies != @calculated_args_dependencies
|
1106
1110
|
# avoid recalculating values again
|
1107
|
-
x, y, parent_absolute_x, parent_absolute_y, default_width, default_width_delta, default_height, default_height_delta, max_width, max_width_delta, max_height, max_height_delta, default_x, default_x_delta, default_y, default_y_delta = @calculated_args_dependencies = calculated_args_dependencies
|
1111
|
+
x, y, parent_absolute_x, parent_absolute_y, default_width, default_width_delta, default_height, default_height_delta, max_width, max_width_delta, max_height, max_height_delta, default_x, default_x_delta, default_y, default_y_delta, string = @calculated_args_dependencies = calculated_args_dependencies
|
1108
1112
|
# Note: Must set x and move_by because not all shapes have a real x and some must translate all their points with move_by
|
1109
1113
|
# TODO change that by setting a bounding box for all shapes with a calculated top-left x, y and
|
1110
1114
|
# a setter that does the moving inside them instead so that I could rely on absolute_x and absolute_y
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glimmer-dsl-swt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.22.2.
|
4
|
+
version: 4.22.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andy Maleh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-02-
|
11
|
+
date: 2022-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|