Set whether a label is ellipsized
This commit is contained in:
parent
8792437357
commit
2146a4f268
@ -5,6 +5,8 @@
|
||||
// Created by david-swift on 23.08.23.
|
||||
//
|
||||
|
||||
import CAdw
|
||||
|
||||
/// A text widget.
|
||||
public typealias Text = Label
|
||||
|
||||
@ -16,4 +18,11 @@ extension Text {
|
||||
self.init(label: text)
|
||||
}
|
||||
|
||||
/// Set whether the text should ellipsize at the end.
|
||||
/// - Parameter ellipsize: Whether it should ellipsize.
|
||||
/// - Returns: The text widget.
|
||||
public func ellipsize(_ ellipsize: Bool = true) -> View {
|
||||
inspect { gtk_label_set_ellipsize($0.pointer, PANGO_ELLIPSIZE_END) }
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user