motion-flow 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/flow/ui/cocoa/button.rb +14 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 707ca8aea0f6a587026d263830de2ef35149a6a9
4
- data.tar.gz: 7cfe35727ca401a0ecb98bb19aa0404284c7bfc5
3
+ metadata.gz: 962f2ae3a417c8249553f522c53ef2d3e8b39be7
4
+ data.tar.gz: fb7db38ffc2658ba797663fa81e5e9c1f27d5baf
5
5
  SHA512:
6
- metadata.gz: 25e4a52d2f54fcfccb84ac9e6a9f4e7baa01231755754a76ea5ef40cd90827b309dba2aa76adea757ab0c8e0edbd91cbf3738009e537729eace798e34e5d78e9
7
- data.tar.gz: af6a0a591db19b2a5cf1f47421c7daccda532531726c838bfac7980e67f73802783f46ca452d674222b365f0142cd3f1cbbd591177aa4cffd7ecd12f9873ab42
6
+ metadata.gz: 0297471465a02c8acb39c841f8ab27fea76e67563dab435feb52fbe29845edbdef50c2847599b099de4a821ce9c09f9813fd8a59fe58931f2ef14a2e81d14edf
7
+ data.tar.gz: 18fc13cbdf9dc56b73c70fdfad852465b06a3953a82e5d09c6e8e22ad902425301b6ea4a3e24047ea753f5d4ce88fc454ac186a497e071868e36ec3fb4911d33
@@ -2,6 +2,20 @@ module UI
2
2
  class Button < Control
3
3
  include Eventable
4
4
 
5
+ def initialize
6
+ super
7
+ calculate_measure(true)
8
+ end
9
+
10
+ def measure(width, height)
11
+ self.proxy.sizeToFit
12
+
13
+ [
14
+ width.nan? ? self.proxy.frame.size.width : width,
15
+ height.nan? ? self.proxy.frame.size.height : height
16
+ ]
17
+ end
18
+
5
19
  def color=(color)
6
20
  case color
7
21
  when Hash
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-flow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - HipByte
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-12 00:00:00.000000000 Z
11
+ date: 2016-08-14 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |-
14
14
  motion-flow allows you to write cross-platform