Skip to content

Commit

Permalink
Merge branch 'develop' into fix/2257
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz authored Jun 15, 2021
2 parents ec2b874 + 0f58bd7 commit dbf63e6
Show file tree
Hide file tree
Showing 136 changed files with 1,883 additions and 1,066 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/static_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
go install golang.org/x/tools/cmd/goimports@latest
go install github.com/fzipp/gocyclo/cmd/gocyclo@latest
go install golang.org/x/lint/golint@latest
go install honnef.co/go/tools/cmd/staticcheck@v0.1.4
go install honnef.co/go/tools/cmd/staticcheck@v0.2.0
- name: Cleanup repository
run: rm -rf vendor/
Expand Down
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
2 changes: 1 addition & 1 deletion cmd/fyne/internal/mobile/binres/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ func (pl *Pool) UnmarshalBinary(bin []byte) error {
}

data := bin[offset : offset+nbytes]
if x := uint8(bin[offset+nbytes]); x != 0 {
if x := bin[offset+nbytes]; x != 0 {
return fmt.Errorf("expected zero terminator, got 0x%02X for nchars=%v nbytes=%v data=%q", x, nchars, nbytes, data)
}
pl.strings[i] = string(data)
Expand Down
32 changes: 16 additions & 16 deletions cmd/fyne/internal/mobile/binres/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,8 @@ func (spec *TypeSpec) UnmarshalBinary(bin []byte) error {
if spec.typ != ResTableTypeSpec {
return errWrongType(spec.typ, ResTableTypeSpec)
}
spec.id = uint8(bin[8])
spec.res0 = uint8(bin[9])
spec.id = bin[8]
spec.res0 = bin[9]
spec.res1 = btou16(bin[10:])
spec.entryCount = btou32(bin[12:])

Expand All @@ -425,7 +425,7 @@ func (spec *TypeSpec) MarshalBinary() ([]byte, error) {
putu16(bin[2:], 16)
putu32(bin[4:], uint32(len(bin)))

bin[8] = byte(spec.id)
bin[8] = spec.id
// [9] = 0
// [10:12] = 0
putu32(bin[12:], uint32(len(spec.entries)))
Expand Down Expand Up @@ -507,8 +507,8 @@ func (typ *Type) UnmarshalBinary(bin []byte) error {
return errWrongType(typ.typ, ResTableType)
}

typ.id = uint8(bin[8])
typ.res0 = uint8(bin[9])
typ.id = bin[8]
typ.res0 = bin[9]
typ.res1 = btou16(bin[10:])
typ.entryCount = btou32(bin[12:])
typ.entriesStart = btou32(bin[16:])
Expand All @@ -522,19 +522,19 @@ func (typ *Type) UnmarshalBinary(bin []byte) error {
typ.config.imsi.mnc = btou16(bin[26:])
typ.config.locale.language = btou16(bin[28:])
typ.config.locale.country = btou16(bin[30:])
typ.config.screenType.orientation = uint8(bin[32])
typ.config.screenType.touchscreen = uint8(bin[33])
typ.config.screenType.orientation = bin[32]
typ.config.screenType.touchscreen = bin[33]
typ.config.screenType.density = btou16(bin[34:])
typ.config.input.keyboard = uint8(bin[36])
typ.config.input.navigation = uint8(bin[37])
typ.config.input.inputFlags = uint8(bin[38])
typ.config.input.inputPad0 = uint8(bin[39])
typ.config.input.keyboard = bin[36]
typ.config.input.navigation = bin[37]
typ.config.input.inputFlags = bin[38]
typ.config.input.inputPad0 = bin[39]
typ.config.screenSize.width = btou16(bin[40:])
typ.config.screenSize.height = btou16(bin[42:])
typ.config.version.sdk = btou16(bin[44:])
typ.config.version.minor = btou16(bin[46:])
typ.config.screenConfig.layout = uint8(bin[48])
typ.config.screenConfig.uiMode = uint8(bin[49])
typ.config.screenConfig.layout = bin[48]
typ.config.screenConfig.uiMode = bin[49]
typ.config.screenConfig.smallestWidthDP = btou16(bin[50:])
typ.config.screenSizeDP.width = btou16(bin[52:])
typ.config.screenSizeDP.height = btou16(bin[54:])
Expand Down Expand Up @@ -572,7 +572,7 @@ func (typ *Type) MarshalBinary() ([]byte, error) {
putu16(bin, uint16(ResTableType))
putu16(bin[2:], 56)

bin[8] = byte(typ.id)
bin[8] = typ.id
// [9] = 0
// [10:12] = 0
putu32(bin[12:], uint32(len(typ.entries)))
Expand Down Expand Up @@ -755,7 +755,7 @@ type Data struct {
// UnmarshalBinary creates the data item from binary data
func (d *Data) UnmarshalBinary(bin []byte) error {
d.ByteSize = btou16(bin)
d.Res0 = uint8(bin[2])
d.Res0 = bin[2]
d.Type = DataType(bin[3])
d.Value = btou32(bin[4:])
return nil
Expand All @@ -765,7 +765,7 @@ func (d *Data) UnmarshalBinary(bin []byte) error {
func (d *Data) MarshalBinary() ([]byte, error) {
bin := make([]byte, 8)
putu16(bin, 8)
bin[2] = byte(d.Res0)
bin[2] = d.Res0
bin[3] = byte(d.Type)
putu32(bin[4:], d.Value)
return bin, nil
Expand Down
3 changes: 3 additions & 0 deletions cmd/fyne_demo/tutorials/icons.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,5 +188,8 @@ func loadIcons() []iconInfo {
{"AccountIcon", theme.AccountIcon()},
{"LoginIcon", theme.LoginIcon()},
{"LogoutIcon", theme.LogoutIcon()},

{"ListIcon", theme.ListIcon()},
{"GridIcon", theme.GridIcon()},
}
}
9 changes: 5 additions & 4 deletions container/apptabs.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ func (t *AppTabs) CreateRenderer() fyne.WidgetRenderer {
},
appTabs: t,
}
r.action = r.buildOverflowTabsButton()

// Initially setup the tab bar to only show one tab, all others will be in overflow.
// When the widget is laid out, and we know the size, the tab bar will be updated to show as many as can fit.
r.updateTabs(1)
Expand Down Expand Up @@ -407,13 +409,12 @@ func (r *appTabsRenderer) updateTabs(max int) {

// Set overflow action
if tabCount <= max {
r.action = nil
r.action.Hide()
r.bar.Layout = layout.NewMaxLayout()
} else {
tabCount = max
if r.action == nil {
r.action = r.buildOverflowTabsButton()
}
r.action.Show()

// Set layout of tab bar containing tab buttons and overflow action
if r.appTabs.location == TabLocationLeading || r.appTabs.location == TabLocationTrailing {
r.bar.Layout = layout.NewBorderLayout(nil, r.action, nil, nil)
Expand Down
2 changes: 1 addition & 1 deletion container/doctabs.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (t *DocTabs) CreateRenderer() fyne.WidgetRenderer {
buttonCache: make(map[*TabItem]*tabButton),
},
docTabs: t,
scroller: &Scroll{},
scroller: NewScroll(nil),
}
r.action = r.buildAllTabsButton()
r.create = r.buildCreateTabsButton()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</content>
<overlay>
<widget size="200x100" type="*widget.OverlayContainer">
<widget pos="145,30" size="55x70" type="*widget.Menu">
<widget pos="145,30" size="55x70" type="*widget.PopUpMenu">
<widget size="55x70" type="*widget.Shadow">
<radialGradient centerOffset="0.5,0.5" pos="-4,-4" size="4x4" startColor="shadow"/>
<linearGradient endColor="shadow" pos="0,-4" size="55x4"/>
Expand Down
2 changes: 1 addition & 1 deletion container/testdata/doctabs/desktop/tapped_all_tabs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</content>
<overlay>
<widget size="300x100" type="*widget.OverlayContainer">
<widget pos="226,0" size="74x100" type="*widget.Menu">
<widget pos="226,0" size="74x100" type="*widget.PopUpMenu">
<widget size="74x100" type="*widget.Shadow">
<radialGradient centerOffset="0.5,0.5" pos="-4,-4" size="4x4" startColor="shadow"/>
<linearGradient endColor="shadow" pos="0,-4" size="74x4"/>
Expand Down
2 changes: 1 addition & 1 deletion container/testdata/doctabs/mobile/tapped_all_tabs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
</content>
<overlay>
<widget size="300x100" type="*widget.OverlayContainer">
<widget pos="226,0" size="74x100" type="*widget.Menu">
<widget pos="226,0" size="74x100" type="*widget.PopUpMenu">
<widget size="74x100" type="*widget.Shadow">
<radialGradient centerOffset="0.5,0.5" pos="-4,-4" size="4x4" startColor="shadow"/>
<linearGradient endColor="shadow" pos="0,-4" size="74x4"/>
Expand Down
Loading

0 comments on commit dbf63e6

Please sign in to comment.