glimmer-cs-gladiator 0.5.1 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -19,19 +19,26 @@ module Glimmer
19
19
 
20
20
  body {
21
21
  composite {
22
+ grid_layout(2, false)
23
+ # TODO troubleshoot why adding margin height 0 causes gladiator to start resizing window smaller than necessary upon launch of Gladiator
24
+ # {
25
+ # margin_height 0
26
+ # }
27
+
22
28
  layout_data :fill, :fill, true, true
23
- grid_layout 2, false
24
29
  @line_numbers_text = styled_text(:multi, :border) {
25
30
  layout_data(:right, :fill, false, true)
31
+
26
32
  font name: 'Consolas', height: OS.mac? ? 15 : 12
27
33
  background color(:widget_background)
28
- foreground rgb(0, 0, 250)
29
- text bind(file, 'line_numbers_content')
30
- top_pixel bind(file, 'top_pixel', read_only: true)
34
+ foreground :dark_blue
35
+ text bind(self, 'file.line_numbers_content')
36
+ top_pixel bind(self, 'file.top_pixel', read_only: true)
31
37
  top_margin 5
32
38
  right_margin 5
33
39
  bottom_margin 5
34
40
  left_margin 5
41
+ editable false
35
42
  on_focus_gained {
36
43
  @text&.swt_widget.setFocus
37
44
  }
@@ -47,10 +54,15 @@ module Glimmer
47
54
  layout_data :fill, :fill, true, true
48
55
  font name: 'Consolas', height: OS.mac? ? 15 : 12
49
56
  foreground rgb(75, 75, 75)
50
- text bind(file, :content)
57
+ text bind(self, 'file.content')
51
58
  focus true
52
- selection bind(file, :selection)
53
- top_pixel bind(file, 'top_pixel')
59
+ selection_count bind(self, 'file.selection_count')
60
+ caret_position bind(self, 'file.caret_position')
61
+ top_pixel bind(self, 'file.top_pixel')
62
+ top_margin 5
63
+ right_margin 5
64
+ bottom_margin 5
65
+ left_margin 5
54
66
  drop_target(DND::DROP_COPY) {
55
67
  transfer [TextTransfer.getInstance].to_java(Transfer)
56
68
  on_drag_enter { |event|
@@ -131,18 +143,14 @@ module Glimmer
131
143
  verify_event.text += file.current_line_indentation
132
144
  end
133
145
  when "\t"
134
- if file.selection_count.to_i > 0
135
- Command.do(file, :indent!)
136
- verify_event.doit = false
137
- else
138
- verify_event.text = ' '
139
- end
146
+ Command.do(file, :indent!)
147
+ verify_event.doit = false
140
148
  end
141
149
  }
142
150
  }
143
151
  }
144
152
  }
145
-
153
+
146
154
  def extract_char(event)
147
155
  event.keyCode.chr
148
156
  rescue => e
metadata CHANGED
@@ -1,21 +1,21 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glimmer-cs-gladiator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Maleh
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-01 00:00:00.000000000 Z
11
+ date: 2020-11-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
15
15
  requirements:
16
16
  - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: 4.17.8.1
18
+ version: 4.17.10.3
19
19
  - - "<"
20
20
  - !ruby/object:Gem::Version
21
21
  version: 5.0.0.0
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- version: 4.17.8.1
29
+ version: 4.17.10.3
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: 5.0.0.0
@@ -49,7 +49,7 @@ dependencies:
49
49
  requirements:
50
50
  - - "~>"
51
51
  - !ruby/object:Gem::Version
52
- version: 1.3.4
52
+ version: 1.3.5
53
53
  name: clipboard
54
54
  prerelease: false
55
55
  type: :runtime
@@ -57,7 +57,7 @@ dependencies:
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 1.3.4
60
+ version: 1.3.5
61
61
  - !ruby/object:Gem::Dependency
62
62
  requirement: !ruby/object:Gem::Requirement
63
63
  requirements: