func (ds *displaySettings) unifiedBackgroundColor(w gtki.Widget) { doInUIThread(func() { styleContext, _ := w.GetStyleContext() styleContext.AddProvider(ds.provider, 9999) styleContext.AddClass("currentBackgroundColor") }) }
func (ds *displaySettings) control(w gtki.Widget) { doInUIThread(func() { styleContext, _ := w.GetStyleContext() styleContext.AddProvider(ds.provider, 9999) styleContext.AddClass("currentFontSetting") }) }
func (conv *conversationPane) connectEnterHandler(target gtki.Widget) { if target == nil { target = conv.entry } target.Connect("key-press-event", func(_ gtki.Widget, ev gdki.Event) bool { evk := g.gdk.EventKeyFrom(ev) ret := false if conv.account.isInsertEnter(evk, conv.shiftEnterSends) { insertEnter(conv.entry) ret = true } else if conv.account.isSend(evk, conv.shiftEnterSends) { conv.onSendMessageSignal() ret = true } return ret }) }
func getFontSizeFrom(w gtki.Widget) uint { styleContext, _ := w.GetStyleContext() property, _ := styleContext.GetProperty2("font", gtki.STATE_FLAG_NORMAL) fontDescription := property.(pangoi.FontDescription) return uint(fontDescription.GetSize() / pangoi.PANGO_SCALE) }
func (ds *displaySettings) defaultSettingsOn(w gtki.Widget) { doInUIThread(func() { styleContext, _ := w.GetStyleContext() styleContext.AddProvider(ds.provider, 9999) }) }