Add rounded corner and padding

This commit is contained in:
Apologieze
2025-01-22 14:11:09 -05:00
parent 96483284ba
commit a4495f2e9e
2 changed files with 15 additions and 1 deletions

View File

@@ -204,7 +204,7 @@ func initMainApp() {
/*if themeVariant == theme.VariantDark {
grayScaleList = 220
}*/
listContainer := container.NewStack(canvas.NewRectangle(color.RGBA{R: grayScaleList, G: grayScaleList, B: grayScaleList, A: 255}), listDisplay)
listContainer := container.NewPadded(&canvas.Rectangle{FillColor: color.RGBA{R: grayScaleList, G: grayScaleList, B: grayScaleList, A: 255}, CornerRadius: 10}, listDisplay)
leftSide := container.NewBorder(vbox, nil, nil, nil, listContainer)

View File

@@ -2,6 +2,7 @@ package main
import (
"fyne.io/fyne/v2"
"fyne.io/fyne/v2/theme"
"image/color"
)
@@ -12,5 +13,18 @@ type forcedVariant struct {
}
func (f *forcedVariant) Color(name fyne.ThemeColorName, _ fyne.ThemeVariant) color.Color {
/*if name == theme.ColorNameBackground {
return color.White
}*/
theme.SelectionRadiusSize()
return f.Theme.Color(name, f.variant)
}
func (f *forcedVariant) Size(s fyne.ThemeSizeName) float32 {
if s == theme.SizeNameSelectionRadius {
return 10
} else if s == theme.SizeNameSeparatorThickness {
return 2
}
return f.Theme.Size(s)
}