chore: move ShortHBox to generics
Some checks failed
Mirror to Codeberg / mirror-to-codeberg (push) Has been cancelled

This commit is contained in:
aclist 2026-08-12 00:54:14 +09:00
parent fc28d419bf
commit 9d8d37e110
2 changed files with 8 additions and 8 deletions

View File

@ -23,3 +23,10 @@ class HBox(GenericBox):
class VBox(GenericBox): class VBox(GenericBox):
def __init__(self, spacing: int = 0) -> None: def __init__(self, spacing: int = 0) -> None:
super().__init__(orientation=Gtk.Orientation.VERTICAL, spacing=spacing) 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)

View File

@ -20,7 +20,7 @@ from dzgui.const.enum import Preferences, ServerTab
from dzgui.strings import errors, options from dzgui.strings import errors, options
from dzgui.util import strings, css, open_links 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.eventbox import InfoEventBox
from dzgui.views.components.labels import LeftLabel from dzgui.views.components.labels import LeftLabel
from dzgui.views.components.buttons import WebButton from dzgui.views.components.buttons import WebButton
@ -71,13 +71,6 @@ class ToggleField(Gtk.Box):
el.set_sensitive(state) 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 class Options(ScrollableMixin, Gtk.ScrolledWindow): # type: ignore
def __init__(self, controller: "Controller"): def __init__(self, controller: "Controller"):
super().__init__( super().__init__(