Added a whole bunch of new icons

This commit is contained in:
Sasha Koshka 2023-04-02 17:55:24 -04:00
parent e9dff8ad07
commit 9f70804420
6 changed files with 51 additions and 11 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@ -1,7 +1,6 @@
package main package main
import "git.tebibyte.media/sashakoshka/tomo" import "git.tebibyte.media/sashakoshka/tomo"
import "git.tebibyte.media/sashakoshka/tomo/theme"
import "git.tebibyte.media/sashakoshka/tomo/layouts" import "git.tebibyte.media/sashakoshka/tomo/layouts"
import "git.tebibyte.media/sashakoshka/tomo/elements" import "git.tebibyte.media/sashakoshka/tomo/elements"
import _ "git.tebibyte.media/sashakoshka/tomo/backends/all" import _ "git.tebibyte.media/sashakoshka/tomo/backends/all"
@ -20,12 +19,13 @@ func run () {
container.Adopt(elements.NewLabel("Just some of the wonderful icons we have:", false), false) container.Adopt(elements.NewLabel("Just some of the wonderful icons we have:", false), false)
container.Adopt(elements.NewSpacer(true), false) container.Adopt(elements.NewSpacer(true), false)
container.Adopt(icons(theme.IconHome, theme.IconRepositories), true) container.Adopt(icons(tomo.IconHome, tomo.IconHistory), true)
container.Adopt(icons(theme.IconFile, theme.IconCD), true) container.Adopt(icons(tomo.IconFile, tomo.IconNetwork), true)
container.Adopt(icons(theme.IconOpen, theme.IconRemoveBookmark), true) container.Adopt(icons(tomo.IconOpen, tomo.IconRemoveFavorite), true)
container.Adopt(icons(tomo.IconCursor, tomo.IconDistort), true)
closeButton := elements.NewButton("Ok") closeButton := elements.NewButton("Ok")
closeButton.SetIcon(theme.IconYes) closeButton.SetIcon(tomo.IconYes)
closeButton.ShowText(false) closeButton.ShowText(false)
closeButton.OnClick(tomo.Stop) closeButton.OnClick(tomo.Stop)
container.Adopt(closeButton, false) container.Adopt(closeButton, false)
@ -34,10 +34,10 @@ func run () {
window.Show() window.Show()
} }
func icons (min, max theme.Icon) (container *containers.Container) { func icons (min, max tomo.Icon) (container *containers.Container) {
container = containers.NewContainer(layouts.Horizontal { true, false }) container = containers.NewContainer(layouts.Horizontal { true, false })
for index := min; index <= max; index ++ { for index := min; index <= max; index ++ {
container.Adopt(elements.NewIcon(index, theme.IconSizeSmall), true) container.Adopt(elements.NewIcon(index, tomo.IconSizeSmall), true)
} }
return return
} }

View File

@ -104,7 +104,8 @@ const (
IconLibraries IconLibraries
IconDownloads IconDownloads
IconRepositories IconRepositories
IconSettings) IconSettings
IconHistory)
const ( const (
// Object icons // Object icons
@ -191,12 +192,29 @@ const (
IconBackward IconBackward
IconForward IconForward
IconRefresh IconRefresh
IconHistory IconUpward
IconYes IconYes
IconNo IconNo
IconUpward) IconUndo
IconRedo
IconRun
IconSearch
IconClose
IconQuit
IconIconify
IconShade
IconMaximize
IconRestore
IconReplace
IconUnite
IconDiffer
IconInvert
IconIntersect)
const ( const (
// Status icons // Status icons
@ -207,7 +225,29 @@ const (
const ( const (
// Tool icons // Tool icons
) IconCursor Icon = iota + 0x200
IconMeasure
IconSelect
IconSelectRectangle
IconSelectEllipse
IconSelectGeometric
IconSelectFreeform
IconSelectLasso
IconSelectFuzzy
IconTransform
IconTranslate
IconRotate
IconScale
IconWarp
IconDistort
IconPencil
IconBrush
IconEraser
IconFill
IconText)
// Hints specifies rendering hints for a particular pattern. Elements can take // Hints specifies rendering hints for a particular pattern. Elements can take
// these into account in order to gain extra performance. // these into account in order to gain extra performance.

Binary file not shown.

Binary file not shown.