From b4b7d3486add5bd13431923bd088bfc806bd2a0c Mon Sep 17 00:00:00 2001 From: piotr Date: Sat, 26 Oct 2024 00:38:20 +0200 Subject: [PATCH] add CSS ID to math result label #134 --- uicomponents.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uicomponents.go b/uicomponents.go index 1128460..c345cc4 100644 --- a/uicomponents.go +++ b/uicomponents.go @@ -617,10 +617,11 @@ func setUpOperationResultWindow(operation string, result string) { vBox, _ := gtk.BoxNew(gtk.ORIENTATION_HORIZONTAL, 5) outerVBox.PackStart(vBox, true, true, 6) lbl, _ := gtk.LabelNew(fmt.Sprintf("%s = %s", operation, result)) + lbl.SetProperty("name", "math-label") vBox.PackStart(lbl, true, true, 12) mRefProvider, _ := gtk.CssProviderNew() - css := "window { background-color: rgba (0, 0, 0, 255); color: #fff; font-weight: bold; border: solid 1px grey; border-radius: 5px}" + css := "window { background-color: rgba (0, 0, 0, 255); color: #fff; border: solid 1px grey; border-radius: 5px}" err = mRefProvider.LoadFromData(css) if err != nil { log.Warn(err)