mirror of
https://github.com/aclist/dztui.git
synced 2026-08-25 17:32:36 +02:00
chore: move ShortHBox to generics
Some checks failed
Mirror to Codeberg / mirror-to-codeberg (push) Has been cancelled
Some checks failed
Mirror to Codeberg / mirror-to-codeberg (push) Has been cancelled
This commit is contained in:
parent
fc28d419bf
commit
9d8d37e110
@ -23,3 +23,10 @@ class HBox(GenericBox):
|
||||
class VBox(GenericBox):
|
||||
def __init__(self, spacing: int = 0) -> None:
|
||||
super().__init__(orientation=Gtk.Orientation.VERTICAL, spacing=spacing)
|
||||
|
||||
class ShortHBox(HBox):
|
||||
def __init__(self, widget: Gtk.Widget) -> None:
|
||||
super().__init__(spacing=5)
|
||||
|
||||
self.set_halign(Gtk.Align.START)
|
||||
self.pack_start(widget, expand=False, fill=False, padding=0)
|
||||
|
||||
@ -20,7 +20,7 @@ from dzgui.const.enum import Preferences, ServerTab
|
||||
from dzgui.strings import errors, options
|
||||
from dzgui.util import strings, css, open_links
|
||||
|
||||
from dzgui.views.components.box import VBox
|
||||
from dzgui.views.components.box import ShortHBox, VBox
|
||||
from dzgui.views.components.eventbox import InfoEventBox
|
||||
from dzgui.views.components.labels import LeftLabel
|
||||
from dzgui.views.components.buttons import WebButton
|
||||
@ -71,13 +71,6 @@ class ToggleField(Gtk.Box):
|
||||
el.set_sensitive(state)
|
||||
|
||||
|
||||
class ShortHBox(Gtk.Box):
|
||||
def __init__(self, widget: Gtk.Widget) -> None:
|
||||
super().__init__(spacing=5, halign=Gtk.Align.START)
|
||||
|
||||
self.pack_start(widget, NO_EXPAND, NO_FILL, NO_PADDING)
|
||||
|
||||
|
||||
class Options(ScrollableMixin, Gtk.ScrolledWindow): # type: ignore
|
||||
def __init__(self, controller: "Controller"):
|
||||
super().__init__(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user