mirror of
https://github.com/TagStudioDev/TagStudio.git
synced 2026-07-20 12:36:19 +02:00
fix(ui): fix issues with tag and field widget appearances
This commit is contained in:
@@ -121,7 +121,6 @@ class TagWidget(QWidget):
|
||||
# if on_click_callback:
|
||||
self.setCursor(Qt.CursorShape.PointingHandCursor)
|
||||
self.base_layout = QVBoxLayout(self)
|
||||
self.base_layout.setAlignment(Qt.AlignmentFlag.AlignLeft)
|
||||
self.base_layout.setObjectName("baseLayout")
|
||||
self.base_layout.setContentsMargins(0, 0, 0, 0)
|
||||
|
||||
|
||||
@@ -12,8 +12,10 @@ from tagstudio.qt.views.stylesheets.stylesheets import (
|
||||
get_tag_highlight_color,
|
||||
get_tag_text_color,
|
||||
list_button_style,
|
||||
tag_remove_button_style,
|
||||
)
|
||||
|
||||
# TODO: These colors and logic should be moved to and reworked in the stylesheets file.
|
||||
primary_color: QColor = QColor(get_tag_color(ColorType.PRIMARY, TagColorEnum.DEFAULT))
|
||||
border_color: QColor = get_tag_border_color(primary_color)
|
||||
highlight_color: QColor = get_tag_highlight_color(primary_color)
|
||||
@@ -30,7 +32,6 @@ class FieldTemplateWidgetView(QWidget):
|
||||
|
||||
self.__root_layout = QVBoxLayout(self)
|
||||
self.__root_layout.setObjectName("root_layout")
|
||||
self.__root_layout.setAlignment(Qt.AlignmentFlag.AlignLeft)
|
||||
self.__root_layout.setContentsMargins(0, 0, 0, 0)
|
||||
|
||||
# Background button
|
||||
@@ -58,6 +59,9 @@ class FieldTemplateWidgetView(QWidget):
|
||||
self._delete_button.setHidden(True)
|
||||
self._delete_button.setMinimumSize(22, 22)
|
||||
self._delete_button.setMaximumSize(22, 22)
|
||||
self._delete_button.setStyleSheet(
|
||||
tag_remove_button_style(primary_color, text_color, border_color, highlight_color)
|
||||
)
|
||||
|
||||
self.__inner_layout.addWidget(self._delete_button)
|
||||
self.__inner_layout.setAlignment(Qt.AlignmentFlag.AlignLeft)
|
||||
|
||||
Reference in New Issue
Block a user