refactor: change history screen to use a list instead of cards
This commit is contained in:
parent
059db8f2fb
commit
084ea252a2
3 changed files with 147 additions and 103 deletions
|
|
@ -1,82 +1,3 @@
|
|||
// package theme
|
||||
//
|
||||
// import (
|
||||
//
|
||||
// "image/color"
|
||||
//
|
||||
// "fyne.io/fyne/v2"
|
||||
// "fyne.io/fyne/v2/theme"
|
||||
//
|
||||
// )
|
||||
//
|
||||
// // Definiere unsere benutzerdefinierten Farben basierend auf dem Mock-up
|
||||
// var (
|
||||
//
|
||||
// ColorSlate900 = color.NRGBA{R: 0x0f, G: 0x17, B: 0x2a, A: 0xff} // bg-slate-900
|
||||
// ColorSlate800 = color.NRGBA{R: 0x1e, G: 0x29, B: 0x3b, A: 0xff} // bg-slate-800
|
||||
// ColorSlate700 = color.NRGBA{R: 0x33, G: 0x41, B: 0x55, A: 0xff} // bg-slate-700
|
||||
// ColorSlate400 = color.NRGBA{R: 0x94, G: 0xa3, B: 0xb8, A: 0xff} // text-slate-400
|
||||
// ColorSlate200 = color.NRGBA{R: 0xe2, G: 0xe8, B: 0xf0, A: 0xff} // text-slate-200
|
||||
// ColorSky500 = color.NRGBA{R: 0x0e, G: 0xa5, B: 0xe9, A: 0xff} // bg-sky-500
|
||||
// ColorSky400 = color.NRGBA{R: 0x38, G: 0xbd, B: 0xf8, A: 0xff} // text-sky-400
|
||||
// ColorRed500 = color.NRGBA{R: 0xef, G: 0x44, B: 0x44, A: 0xff} // red-500
|
||||
//
|
||||
// )
|
||||
//
|
||||
// // KettlebellTheme ist unsere benutzerdefinierte Theme-Implementierung
|
||||
// type KettlebellTheme struct{}
|
||||
//
|
||||
// func (t *KettlebellTheme) Color(name fyne.ThemeColorName, variant fyne.ThemeVariant) color.Color {
|
||||
// switch name {
|
||||
// case theme.ColorNameBackground:
|
||||
// return ColorSlate900
|
||||
// case theme.ColorNameButton:
|
||||
// return ColorSlate800
|
||||
// case theme.ColorNameDisabledButton:
|
||||
// return ColorSlate700
|
||||
// case theme.ColorNamePrimary:
|
||||
// return ColorSky500
|
||||
// case theme.ColorNamePlaceHolder:
|
||||
// return ColorSlate400
|
||||
// case theme.ColorNameHover:
|
||||
// return ColorSlate700
|
||||
// case theme.ColorNameForeground:
|
||||
// return ColorSlate200
|
||||
// case theme.ColorNameDisabled:
|
||||
// return ColorSlate400
|
||||
// case theme.ColorNameError:
|
||||
// return ColorRed500
|
||||
// case theme.ColorNameInputBackground:
|
||||
// return ColorSlate800
|
||||
// case theme.ColorNameSeparator:
|
||||
// return ColorSlate700
|
||||
// default:
|
||||
// return theme.DefaultTheme().Color(name, variant)
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// func (t *KettlebellTheme) Icon(name fyne.ThemeIconName) fyne.Resource {
|
||||
// return theme.DefaultTheme().Icon(name)
|
||||
// }
|
||||
//
|
||||
// func (t *KettlebellTheme) Font(style fyne.TextStyle) fyne.Resource {
|
||||
// return theme.DefaultTheme().Font(style)
|
||||
// }
|
||||
//
|
||||
// func (t *KettlebellTheme) Size(name fyne.ThemeSizeName) float32 {
|
||||
// switch name {
|
||||
// case theme.SizeNamePadding:
|
||||
// return 8
|
||||
// case theme.SizeNameText:
|
||||
// return 16
|
||||
// case theme.SizeNameHeadingText:
|
||||
// return 24
|
||||
// case theme.SizeNameSubHeadingText:
|
||||
// return 20
|
||||
// default:
|
||||
// return theme.DefaultTheme().Size(name)
|
||||
// }
|
||||
// }
|
||||
package theme
|
||||
|
||||
import (
|
||||
|
|
@ -86,21 +7,17 @@ import (
|
|||
"fyne.io/fyne/v2/theme"
|
||||
)
|
||||
|
||||
// One Dark Farben (angepasst für Fyne)
|
||||
var (
|
||||
// Basisfarben
|
||||
OneDarkBackground = color.NRGBA{R: 40, G: 44, B: 52, A: 0xff} // #282c34 (helleres Grau)
|
||||
OneDarkCardBackground = color.NRGBA{R: 30, G: 32, B: 40, A: 0xff} // #1e2028 (dunkler für Cards)
|
||||
OneDarkText = color.NRGBA{R: 171, G: 178, B: 191, A: 0xff} // #abb2bf (Standard-Text)
|
||||
OneDarkSubtleText = color.NRGBA{R: 110, G: 115, B: 141, A: 0xff} // #6e738d (deaktiviert, Placeholder)
|
||||
|
||||
// Akzentfarben (One Dark)
|
||||
OneDarkGreen = color.NRGBA{R: 152, G: 195, B: 121, A: 0xff} // #98c379
|
||||
OneDarkRed = color.NRGBA{R: 224, G: 108, B: 117, A: 0xff} // #e06c75
|
||||
OneDarkYellow = color.NRGBA{R: 229, G: 192, B: 123, A: 0xff} // #e5c07b
|
||||
)
|
||||
|
||||
// KettlebellThemeOneDark ist das angepasste Theme
|
||||
type KettlebellThemeOneDark struct{}
|
||||
|
||||
func (t *KettlebellThemeOneDark) Color(name fyne.ThemeColorName, variant fyne.ThemeVariant) color.Color {
|
||||
|
|
@ -133,8 +50,6 @@ func (t *KettlebellThemeOneDark) Color(name fyne.ThemeColorName, variant fyne.Th
|
|||
return OneDarkCardBackground
|
||||
case theme.ColorNameFocus:
|
||||
return OneDarkYellow
|
||||
// case theme.ColorNameCardBackground:
|
||||
// return OneDarkCardBackground
|
||||
default:
|
||||
return theme.DefaultTheme().Color(name, variant)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue