Skip to content

Commit

Permalink
Feature/buttonkeys (fyne-io#2263)
Browse files Browse the repository at this point in the history
* Add space-key-tap to button
* Add focus, tap to open, and indicator border to Hyperlink
* Update Focus to remove automatic tap activation
  • Loading branch information
andydotxyz authored Jun 3, 2021
1 parent 70865d1 commit fca4f9d
Show file tree
Hide file tree
Showing 65 changed files with 369 additions and 358 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,17 @@
This file lists the main changes with each version of the Fyne toolkit.
More detailed release notes can be found on the [releases page](https://github.com/fyne-io/fyne/releases).

## 2.1 - Ongoing

### Added

### Updated

* Focusable widgets are no longer focused on tap, add canvas.Focus(obj) in Tapped handler if required

### Fixed


## 2.0.3 - 30 April 2021

### Fixed
Expand Down
19 changes: 17 additions & 2 deletions internal/driver/glfw/menu_bar_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func TestMenuBar(t *testing.T) {

menuBar := glfw.NewMenuBar(menu, c)
themeCounter := 0
button := widget.NewButton("Button", func() {
button := newNotFocusableButton("Button", func() {
switch themeCounter % 2 {
case 0:
test.ApplyTheme(t, test.NewTheme())
Expand Down Expand Up @@ -327,7 +327,7 @@ func TestMenuBar(t *testing.T) {

menuBar := glfw.NewMenuBar(menu, c)
themeCounter := 0
button := widget.NewButton("Button", func() {
button := newNotFocusableButton("Button", func() {
switch themeCounter % 2 {
case 0:
test.ApplyTheme(t, test.NewTheme())
Expand Down Expand Up @@ -526,3 +526,18 @@ func TestMenuBar_Toggle(t *testing.T) {
test.AssertRendersToMarkup(t, "menu_bar_toggle_deactivated.xml", c)
})
}

type notFocusableButton struct {
widget.Label
f func()
}

func newNotFocusableButton(l string, f func()) *notFocusableButton {
n := &notFocusableButton{f: f}
n.Label.Text = l
return n
}

func (n *notFocusableButton) Tapped(e *fyne.PointEvent) {
n.f()
}
Binary file modified internal/driver/glfw/testdata/menu_bar_active_edit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified internal/driver/glfw/testdata/menu_bar_active_file.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified internal/driver/glfw/testdata/menu_bar_active_help.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified internal/driver/glfw/testdata/menu_bar_hovered_content.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified internal/driver/glfw/testdata/menu_bar_hovered_file_new.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified internal/driver/glfw/testdata/menu_bar_hovered_file_open.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified internal/driver/glfw/testdata/menu_bar_hovered_file_recent.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified internal/driver/glfw/testdata/menu_bar_inactive_file.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified internal/driver/glfw/testdata/menu_bar_initial.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 2 additions & 14 deletions internal/driver/glfw/testdata/menu_bar_kbdctrl_close_submenu_1.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
<canvas size="300x300">
<content>
<container size="300x300">
<widget pos="100,50" size="77x37" type="*widget.Button">
<widget pos="2,2" size="73x33" type="*widget.Shadow">
<radialGradient centerOffset="0.5,0.5" pos="-2,-2" size="2x2" startColor="shadow"/>
<linearGradient endColor="shadow" pos="0,-2" size="73x2"/>
<radialGradient centerOffset="-0.5,0.5" pos="73,-2" size="2x2" startColor="shadow"/>
<linearGradient angle="270" pos="73,0" size="2x33" startColor="shadow"/>
<radialGradient centerOffset="-0.5,-0.5" pos="73,33" size="2x2" startColor="shadow"/>
<linearGradient pos="0,33" size="73x2" startColor="shadow"/>
<radialGradient centerOffset="0.5,-0.5" pos="-2,33" size="2x2" startColor="shadow"/>
<linearGradient angle="270" endColor="shadow" pos="-2,0" size="2x33"/>
</widget>
<rectangle fillColor="button" pos="2,2" size="73x33"/>
<rectangle size="0x0"/>
<text bold pos="12,8" size="53x21">Button</text>
<widget pos="100,50" size="65x37" type="*glfw_test.notFocusableButton">
<text pos="8,8" size="49x21">Button</text>
</widget>
<widget size="300x29" type="*glfw.MenuBar">
<widget size="300x29" type="*widget.Shadow">
Expand Down
16 changes: 2 additions & 14 deletions internal/driver/glfw/testdata/menu_bar_kbdctrl_close_submenu_2.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
<canvas size="300x300">
<content>
<container size="300x300">
<widget pos="100,50" size="77x37" type="*widget.Button">
<widget pos="2,2" size="73x33" type="*widget.Shadow">
<radialGradient centerOffset="0.5,0.5" pos="-2,-2" size="2x2" startColor="shadow"/>
<linearGradient endColor="shadow" pos="0,-2" size="73x2"/>
<radialGradient centerOffset="-0.5,0.5" pos="73,-2" size="2x2" startColor="shadow"/>
<linearGradient angle="270" pos="73,0" size="2x33" startColor="shadow"/>
<radialGradient centerOffset="-0.5,-0.5" pos="73,33" size="2x2" startColor="shadow"/>
<linearGradient pos="0,33" size="73x2" startColor="shadow"/>
<radialGradient centerOffset="0.5,-0.5" pos="-2,33" size="2x2" startColor="shadow"/>
<linearGradient angle="270" endColor="shadow" pos="-2,0" size="2x33"/>
</widget>
<rectangle fillColor="button" pos="2,2" size="73x33"/>
<rectangle size="0x0"/>
<text bold pos="12,8" size="53x21">Button</text>
<widget pos="100,50" size="65x37" type="*glfw_test.notFocusableButton">
<text pos="8,8" size="49x21">Button</text>
</widget>
<widget size="300x29" type="*glfw.MenuBar">
<widget size="300x29" type="*widget.Shadow">
Expand Down
16 changes: 2 additions & 14 deletions internal/driver/glfw/testdata/menu_bar_kbdctrl_open_submenu_1.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
<canvas size="300x300">
<content>
<container size="300x300">
<widget pos="100,50" size="77x37" type="*widget.Button">
<widget pos="2,2" size="73x33" type="*widget.Shadow">
<radialGradient centerOffset="0.5,0.5" pos="-2,-2" size="2x2" startColor="shadow"/>
<linearGradient endColor="shadow" pos="0,-2" size="73x2"/>
<radialGradient centerOffset="-0.5,0.5" pos="73,-2" size="2x2" startColor="shadow"/>
<linearGradient angle="270" pos="73,0" size="2x33" startColor="shadow"/>
<radialGradient centerOffset="-0.5,-0.5" pos="73,33" size="2x2" startColor="shadow"/>
<linearGradient pos="0,33" size="73x2" startColor="shadow"/>
<radialGradient centerOffset="0.5,-0.5" pos="-2,33" size="2x2" startColor="shadow"/>
<linearGradient angle="270" endColor="shadow" pos="-2,0" size="2x33"/>
</widget>
<rectangle fillColor="button" pos="2,2" size="73x33"/>
<rectangle size="0x0"/>
<text bold pos="12,8" size="53x21">Button</text>
<widget pos="100,50" size="65x37" type="*glfw_test.notFocusableButton">
<text pos="8,8" size="49x21">Button</text>
</widget>
<widget size="300x29" type="*glfw.MenuBar">
<widget size="300x29" type="*widget.Shadow">
Expand Down
16 changes: 2 additions & 14 deletions internal/driver/glfw/testdata/menu_bar_kbdctrl_open_submenu_2.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
<canvas size="300x300">
<content>
<container size="300x300">
<widget pos="100,50" size="77x37" type="*widget.Button">
<widget pos="2,2" size="73x33" type="*widget.Shadow">
<radialGradient centerOffset="0.5,0.5" pos="-2,-2" size="2x2" startColor="shadow"/>
<linearGradient endColor="shadow" pos="0,-2" size="73x2"/>
<radialGradient centerOffset="-0.5,0.5" pos="73,-2" size="2x2" startColor="shadow"/>
<linearGradient angle="270" pos="73,0" size="2x33" startColor="shadow"/>
<radialGradient centerOffset="-0.5,-0.5" pos="73,33" size="2x2" startColor="shadow"/>
<linearGradient pos="0,33" size="73x2" startColor="shadow"/>
<radialGradient centerOffset="0.5,-0.5" pos="-2,33" size="2x2" startColor="shadow"/>
<linearGradient angle="270" endColor="shadow" pos="-2,0" size="2x33"/>
</widget>
<rectangle fillColor="button" pos="2,2" size="73x33"/>
<rectangle size="0x0"/>
<text bold pos="12,8" size="53x21">Button</text>
<widget pos="100,50" size="65x37" type="*glfw_test.notFocusableButton">
<text pos="8,8" size="49x21">Button</text>
</widget>
<widget size="300x29" type="*glfw.MenuBar">
<widget size="300x29" type="*widget.Shadow">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
<canvas size="300x300">
<content>
<container size="300x300">
<widget pos="100,50" size="77x37" type="*widget.Button">
<widget pos="2,2" size="73x33" type="*widget.Shadow">
<radialGradient centerOffset="0.5,0.5" pos="-2,-2" size="2x2" startColor="shadow"/>
<linearGradient endColor="shadow" pos="0,-2" size="73x2"/>
<radialGradient centerOffset="-0.5,0.5" pos="73,-2" size="2x2" startColor="shadow"/>
<linearGradient angle="270" pos="73,0" size="2x33" startColor="shadow"/>
<radialGradient centerOffset="-0.5,-0.5" pos="73,33" size="2x2" startColor="shadow"/>
<linearGradient pos="0,33" size="73x2" startColor="shadow"/>
<radialGradient centerOffset="0.5,-0.5" pos="-2,33" size="2x2" startColor="shadow"/>
<linearGradient angle="270" endColor="shadow" pos="-2,0" size="2x33"/>
</widget>
<rectangle fillColor="button" pos="2,2" size="73x33"/>
<rectangle size="0x0"/>
<text bold pos="12,8" size="53x21">Button</text>
<widget pos="100,50" size="65x37" type="*glfw_test.notFocusableButton">
<text pos="8,8" size="49x21">Button</text>
</widget>
<widget size="300x29" type="*glfw.MenuBar">
<widget size="300x29" type="*widget.Shadow">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
<canvas size="300x300">
<content>
<container size="300x300">
<widget pos="100,50" size="77x37" type="*widget.Button">
<widget pos="2,2" size="73x33" type="*widget.Shadow">
<radialGradient centerOffset="0.5,0.5" pos="-2,-2" size="2x2" startColor="shadow"/>
<linearGradient endColor="shadow" pos="0,-2" size="73x2"/>
<radialGradient centerOffset="-0.5,0.5" pos="73,-2" size="2x2" startColor="shadow"/>
<linearGradient angle="270" pos="73,0" size="2x33" startColor="shadow"/>
<radialGradient centerOffset="-0.5,-0.5" pos="73,33" size="2x2" startColor="shadow"/>
<linearGradient pos="0,33" size="73x2" startColor="shadow"/>
<radialGradient centerOffset="0.5,-0.5" pos="-2,33" size="2x2" startColor="shadow"/>
<linearGradient angle="270" endColor="shadow" pos="-2,0" size="2x33"/>
</widget>
<rectangle fillColor="button" pos="2,2" size="73x33"/>
<rectangle size="0x0"/>
<text bold pos="12,8" size="53x21">Button</text>
<widget pos="100,50" size="65x37" type="*glfw_test.notFocusableButton">
<text pos="8,8" size="49x21">Button</text>
</widget>
<widget size="300x29" type="*glfw.MenuBar">
<widget size="300x29" type="*widget.Shadow">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
<canvas size="300x300">
<content>
<container size="300x300">
<widget pos="100,50" size="77x37" type="*widget.Button">
<widget pos="2,2" size="73x33" type="*widget.Shadow">
<radialGradient centerOffset="0.5,0.5" pos="-2,-2" size="2x2" startColor="shadow"/>
<linearGradient endColor="shadow" pos="0,-2" size="73x2"/>
<radialGradient centerOffset="-0.5,0.5" pos="73,-2" size="2x2" startColor="shadow"/>
<linearGradient angle="270" pos="73,0" size="2x33" startColor="shadow"/>
<radialGradient centerOffset="-0.5,-0.5" pos="73,33" size="2x2" startColor="shadow"/>
<linearGradient pos="0,33" size="73x2" startColor="shadow"/>
<radialGradient centerOffset="0.5,-0.5" pos="-2,33" size="2x2" startColor="shadow"/>
<linearGradient angle="270" endColor="shadow" pos="-2,0" size="2x33"/>
</widget>
<rectangle fillColor="button" pos="2,2" size="73x33"/>
<rectangle size="0x0"/>
<text bold pos="12,8" size="53x21">Button</text>
<widget pos="100,50" size="65x37" type="*glfw_test.notFocusableButton">
<text pos="8,8" size="49x21">Button</text>
</widget>
<widget size="300x29" type="*glfw.MenuBar">
<widget size="300x29" type="*widget.Shadow">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
<canvas size="300x300">
<content>
<container size="300x300">
<widget pos="100,50" size="77x37" type="*widget.Button">
<widget pos="2,2" size="73x33" type="*widget.Shadow">
<radialGradient centerOffset="0.5,0.5" pos="-2,-2" size="2x2" startColor="shadow"/>
<linearGradient endColor="shadow" pos="0,-2" size="73x2"/>
<radialGradient centerOffset="-0.5,0.5" pos="73,-2" size="2x2" startColor="shadow"/>
<linearGradient angle="270" pos="73,0" size="2x33" startColor="shadow"/>
<radialGradient centerOffset="-0.5,-0.5" pos="73,33" size="2x2" startColor="shadow"/>
<linearGradient pos="0,33" size="73x2" startColor="shadow"/>
<radialGradient centerOffset="0.5,-0.5" pos="-2,33" size="2x2" startColor="shadow"/>
<linearGradient angle="270" endColor="shadow" pos="-2,0" size="2x33"/>
</widget>
<rectangle fillColor="button" pos="2,2" size="73x33"/>
<rectangle size="0x0"/>
<text bold pos="12,8" size="53x21">Button</text>
<widget pos="100,50" size="65x37" type="*glfw_test.notFocusableButton">
<text pos="8,8" size="49x21">Button</text>
</widget>
<widget size="300x29" type="*glfw.MenuBar">
<widget size="300x29" type="*widget.Shadow">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
<canvas size="300x300">
<content>
<container size="300x300">
<widget pos="100,50" size="77x37" type="*widget.Button">
<widget pos="2,2" size="73x33" type="*widget.Shadow">
<radialGradient centerOffset="0.5,0.5" pos="-2,-2" size="2x2" startColor="shadow"/>
<linearGradient endColor="shadow" pos="0,-2" size="73x2"/>
<radialGradient centerOffset="-0.5,0.5" pos="73,-2" size="2x2" startColor="shadow"/>
<linearGradient angle="270" pos="73,0" size="2x33" startColor="shadow"/>
<radialGradient centerOffset="-0.5,-0.5" pos="73,33" size="2x2" startColor="shadow"/>
<linearGradient pos="0,33" size="73x2" startColor="shadow"/>
<radialGradient centerOffset="0.5,-0.5" pos="-2,33" size="2x2" startColor="shadow"/>
<linearGradient angle="270" endColor="shadow" pos="-2,0" size="2x33"/>
</widget>
<rectangle fillColor="button" pos="2,2" size="73x33"/>
<rectangle size="0x0"/>
<text bold pos="12,8" size="53x21">Button</text>
<widget pos="100,50" size="65x37" type="*glfw_test.notFocusableButton">
<text pos="8,8" size="49x21">Button</text>
</widget>
<widget size="300x29" type="*glfw.MenuBar">
<widget size="300x29" type="*widget.Shadow">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
<canvas size="300x300">
<content>
<container size="300x300">
<widget pos="100,50" size="77x37" type="*widget.Button">
<widget pos="2,2" size="73x33" type="*widget.Shadow">
<radialGradient centerOffset="0.5,0.5" pos="-2,-2" size="2x2" startColor="shadow"/>
<linearGradient endColor="shadow" pos="0,-2" size="73x2"/>
<radialGradient centerOffset="-0.5,0.5" pos="73,-2" size="2x2" startColor="shadow"/>
<linearGradient angle="270" pos="73,0" size="2x33" startColor="shadow"/>
<radialGradient centerOffset="-0.5,-0.5" pos="73,33" size="2x2" startColor="shadow"/>
<linearGradient pos="0,33" size="73x2" startColor="shadow"/>
<radialGradient centerOffset="0.5,-0.5" pos="-2,33" size="2x2" startColor="shadow"/>
<linearGradient angle="270" endColor="shadow" pos="-2,0" size="2x33"/>
</widget>
<rectangle fillColor="button" pos="2,2" size="73x33"/>
<rectangle size="0x0"/>
<text bold pos="12,8" size="53x21">Button</text>
<widget pos="100,50" size="65x37" type="*glfw_test.notFocusableButton">
<text pos="8,8" size="49x21">Button</text>
</widget>
<widget size="300x29" type="*glfw.MenuBar">
<widget size="300x29" type="*widget.Shadow">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
<canvas size="300x300">
<content>
<container size="300x300">
<widget pos="100,50" size="77x37" type="*widget.Button">
<widget pos="2,2" size="73x33" type="*widget.Shadow">
<radialGradient centerOffset="0.5,0.5" pos="-2,-2" size="2x2" startColor="shadow"/>
<linearGradient endColor="shadow" pos="0,-2" size="73x2"/>
<radialGradient centerOffset="-0.5,0.5" pos="73,-2" size="2x2" startColor="shadow"/>
<linearGradient angle="270" pos="73,0" size="2x33" startColor="shadow"/>
<radialGradient centerOffset="-0.5,-0.5" pos="73,33" size="2x2" startColor="shadow"/>
<linearGradient pos="0,33" size="73x2" startColor="shadow"/>
<radialGradient centerOffset="0.5,-0.5" pos="-2,33" size="2x2" startColor="shadow"/>
<linearGradient angle="270" endColor="shadow" pos="-2,0" size="2x33"/>
</widget>
<rectangle fillColor="button" pos="2,2" size="73x33"/>
<rectangle size="0x0"/>
<text bold pos="12,8" size="53x21">Button</text>
<widget pos="100,50" size="65x37" type="*glfw_test.notFocusableButton">
<text pos="8,8" size="49x21">Button</text>
</widget>
<widget size="300x29" type="*glfw.MenuBar">
<widget size="300x29" type="*widget.Shadow">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
<canvas size="300x300">
<content>
<container size="300x300">
<widget pos="100,50" size="77x37" type="*widget.Button">
<widget pos="2,2" size="73x33" type="*widget.Shadow">
<radialGradient centerOffset="0.5,0.5" pos="-2,-2" size="2x2" startColor="shadow"/>
<linearGradient endColor="shadow" pos="0,-2" size="73x2"/>
<radialGradient centerOffset="-0.5,0.5" pos="73,-2" size="2x2" startColor="shadow"/>
<linearGradient angle="270" pos="73,0" size="2x33" startColor="shadow"/>
<radialGradient centerOffset="-0.5,-0.5" pos="73,33" size="2x2" startColor="shadow"/>
<linearGradient pos="0,33" size="73x2" startColor="shadow"/>
<radialGradient centerOffset="0.5,-0.5" pos="-2,33" size="2x2" startColor="shadow"/>
<linearGradient angle="270" endColor="shadow" pos="-2,0" size="2x33"/>
</widget>
<rectangle fillColor="button" pos="2,2" size="73x33"/>
<rectangle size="0x0"/>
<text bold pos="12,8" size="53x21">Button</text>
<widget pos="100,50" size="65x37" type="*glfw_test.notFocusableButton">
<text pos="8,8" size="49x21">Button</text>
</widget>
<widget size="300x29" type="*glfw.MenuBar">
<widget size="300x29" type="*widget.Shadow">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
<canvas size="300x300">
<content>
<container size="300x300">
<widget pos="100,50" size="77x37" type="*widget.Button">
<widget pos="2,2" size="73x33" type="*widget.Shadow">
<radialGradient centerOffset="0.5,0.5" pos="-2,-2" size="2x2" startColor="shadow"/>
<linearGradient endColor="shadow" pos="0,-2" size="73x2"/>
<radialGradient centerOffset="-0.5,0.5" pos="73,-2" size="2x2" startColor="shadow"/>
<linearGradient angle="270" pos="73,0" size="2x33" startColor="shadow"/>
<radialGradient centerOffset="-0.5,-0.5" pos="73,33" size="2x2" startColor="shadow"/>
<linearGradient pos="0,33" size="73x2" startColor="shadow"/>
<radialGradient centerOffset="0.5,-0.5" pos="-2,33" size="2x2" startColor="shadow"/>
<linearGradient angle="270" endColor="shadow" pos="-2,0" size="2x33"/>
</widget>
<rectangle fillColor="button" pos="2,2" size="73x33"/>
<rectangle size="0x0"/>
<text bold pos="12,8" size="53x21">Button</text>
<widget pos="100,50" size="65x37" type="*glfw_test.notFocusableButton">
<text pos="8,8" size="49x21">Button</text>
</widget>
<widget size="300x29" type="*glfw.MenuBar">
<widget size="300x29" type="*widget.Shadow">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
<canvas size="300x300">
<content>
<container size="300x300">
<widget pos="100,50" size="77x37" type="*widget.Button">
<widget pos="2,2" size="73x33" type="*widget.Shadow">
<radialGradient centerOffset="0.5,0.5" pos="-2,-2" size="2x2" startColor="shadow"/>
<linearGradient endColor="shadow" pos="0,-2" size="73x2"/>
<radialGradient centerOffset="-0.5,0.5" pos="73,-2" size="2x2" startColor="shadow"/>
<linearGradient angle="270" pos="73,0" size="2x33" startColor="shadow"/>
<radialGradient centerOffset="-0.5,-0.5" pos="73,33" size="2x2" startColor="shadow"/>
<linearGradient pos="0,33" size="73x2" startColor="shadow"/>
<radialGradient centerOffset="0.5,-0.5" pos="-2,33" size="2x2" startColor="shadow"/>
<linearGradient angle="270" endColor="shadow" pos="-2,0" size="2x33"/>
</widget>
<rectangle fillColor="button" pos="2,2" size="73x33"/>
<rectangle size="0x0"/>
<text bold pos="12,8" size="53x21">Button</text>
<widget pos="100,50" size="65x37" type="*glfw_test.notFocusableButton">
<text pos="8,8" size="49x21">Button</text>
</widget>
<widget size="300x29" type="*glfw.MenuBar">
<widget size="300x29" type="*widget.Shadow">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,8 @@
<canvas size="300x300">
<content>
<container size="300x300">
<widget pos="100,50" size="77x37" type="*widget.Button">
<widget pos="2,2" size="73x33" type="*widget.Shadow">
<radialGradient centerOffset="0.5,0.5" pos="-2,-2" size="2x2" startColor="shadow"/>
<linearGradient endColor="shadow" pos="0,-2" size="73x2"/>
<radialGradient centerOffset="-0.5,0.5" pos="73,-2" size="2x2" startColor="shadow"/>
<linearGradient angle="270" pos="73,0" size="2x33" startColor="shadow"/>
<radialGradient centerOffset="-0.5,-0.5" pos="73,33" size="2x2" startColor="shadow"/>
<linearGradient pos="0,33" size="73x2" startColor="shadow"/>
<radialGradient centerOffset="0.5,-0.5" pos="-2,33" size="2x2" startColor="shadow"/>
<linearGradient angle="270" endColor="shadow" pos="-2,0" size="2x33"/>
</widget>
<rectangle fillColor="button" pos="2,2" size="73x33"/>
<rectangle size="0x0"/>
<text bold pos="12,8" size="53x21">Button</text>
<widget pos="100,50" size="65x37" type="*glfw_test.notFocusableButton">
<text pos="8,8" size="49x21">Button</text>
</widget>
<widget size="300x29" type="*glfw.MenuBar">
<widget size="300x29" type="*widget.Shadow">
Expand Down
Loading

0 comments on commit fca4f9d

Please sign in to comment.