Inceptum/launcher-gtk/src/main/kotlin/io/gitlab/jfronny/inceptum/gtk/util/UIExt.kt

34 lines
887 B
Kotlin

package io.gitlab.jfronny.inceptum.gtk.util
import io.gitlab.jfronny.inceptum.gtk.control.ILabel
import org.gnome.adw.ActionRow
import org.gnome.gtk.*
var Widget.margin: Int
set(value) {
marginVertical = value
marginHorizontal = value
}
get() = throw NotImplementedError()
var Widget.marginVertical: Int
set(value) {
marginTop = value
marginBottom = value
}
get() = throw NotImplementedError()
var Widget.marginHorizontal: Int
set(value) {
marginStart = value
marginEnd = value
}
get() = throw NotImplementedError()
var MessageDialog.markup: String
set(value) { setMarkup(value) }
get() = throw NotImplementedError()
fun ActionRow.fixSubtitle() = ILabel.theme(firstChild!!.lastChild!!.prevSibling!!.lastChild as Label, ILabel.Mode.SUBTITLE)
fun EntryBuffer.clear() = deleteText(0, length)