Compare commits
3 Commits
6451050fd3
...
753e3e4023
Author | SHA1 | Date | |
---|---|---|---|
753e3e4023 | |||
5c46950224 | |||
f22c268a10 |
@ -8,7 +8,6 @@ import "strings"
|
||||
import "net/url"
|
||||
import "git.tebibyte.media/tomo/tomo"
|
||||
import "git.tebibyte.media/tomo/objects"
|
||||
import "git.tebibyte.media/tomo/tomo/canvas"
|
||||
import "git.tebibyte.media/tomo/nasin/internal/registrar"
|
||||
|
||||
// Application represents an application object.
|
||||
@ -202,22 +201,16 @@ func applicationOpenUrls (application Application, args ...string) {
|
||||
}
|
||||
|
||||
func setApplicationWindowIcon (window tomo.Window, description ApplicationDescription) {
|
||||
allSizes := func (icon tomo.Icon) (sizes []canvas.Texture) {
|
||||
small := icon.Texture(tomo.IconSizeSmall)
|
||||
medium := icon.Texture(tomo.IconSizeMedium)
|
||||
large := icon.Texture(tomo.IconSizeLarge)
|
||||
if small != nil { sizes = append(sizes, small) }
|
||||
if medium != nil { sizes = append(sizes, medium) }
|
||||
if large != nil { sizes = append(sizes, large) }
|
||||
return sizes
|
||||
iconExists := func (icon tomo.Icon) bool {
|
||||
return icon.Texture(tomo.IconSizeMedium) != nil
|
||||
}
|
||||
|
||||
if sizes := allSizes(tomo.Icon(description.ID)); len(sizes) > 0 {
|
||||
window.SetIcon(sizes...)
|
||||
if iconExists(tomo.Icon(description.ID)) {
|
||||
window.SetIcon(tomo.Icon(description.ID))
|
||||
return
|
||||
}
|
||||
if sizes := allSizes(description.Role.Icon()); len(sizes) > 0 {
|
||||
window.SetIcon(sizes...)
|
||||
if iconExists(description.Role.Icon()) {
|
||||
window.SetIcon(description.Role.Icon())
|
||||
return
|
||||
}
|
||||
}
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 26 KiB |
@ -219,6 +219,11 @@ var rules = []tomo.Rule {
|
||||
tomo.AttrMinimumSize { X: 12, Y: 12, },
|
||||
), tomo.R("", "SliderHandle")),
|
||||
|
||||
// *.ScrollContainer
|
||||
tomo.Ru(tomo.AS (
|
||||
tomo.AGap(0, 0),
|
||||
), tomo.R("", "ScrollContainer")),
|
||||
|
||||
// *.Checkbox
|
||||
tomo.Ru(tomo.AS (
|
||||
tomo.ABorder (
|
||||
|
Loading…
Reference in New Issue
Block a user