gui-utilities 1.3.6__tar.gz → 1.3.13__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of gui-utilities might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gui_utilities
3
- Version: 1.3.6
3
+ Version: 1.3.13
4
4
  Summary: Librería de utilidades gráficas en PyQt6
5
5
  Author-email: Guido Iván Gross <grossguidoivan@gmail.com>
6
6
  Requires-Python: >=3.8
@@ -176,7 +176,11 @@ def create_label(
176
176
  padding_bottom = None,
177
177
  border_width = 0,
178
178
  border_color = "#ffffff",
179
- border_radius = 0
179
+ border_radius = 0,
180
+ hover_background_color = "#1e1e1e",
181
+ pressed_background_color = "#1e1e1e",
182
+ disabled_font_color = "#888888",
183
+ disabled_background_color = "#2d2d2d"
180
184
  ):
181
185
  label = QLabel(text)
182
186
  padding_left_value = padding_left if padding_left is not None else padding
@@ -184,17 +188,29 @@ def create_label(
184
188
  padding_right_value = padding_right if padding_right is not None else padding
185
189
  padding_bottom_value = padding_bottom if padding_bottom is not None else padding
186
190
  style = f"""
187
- font-family: {font_family};
188
- font-size: {font_size}px;
189
- color: {font_color};
190
- font-weight: {font_weight};
191
- background-color: {background_color};
192
- padding-left: {padding_left_value}px;
193
- padding-top: {padding_top_value}px;
194
- padding-right: {padding_right_value}px;
195
- padding-bottom: {padding_bottom_value}px;
196
- border: {border_width}px solid {border_color};
197
- border-radius: {border_radius}px;
191
+ QLabel {{
192
+ font-family: {font_family};
193
+ font-size: {font_size}px;
194
+ color: {font_color};
195
+ font-weight: {font_weight};
196
+ background-color: {background_color};
197
+ padding-left: {padding_left_value}px;
198
+ padding-top: {padding_top_value}px;
199
+ padding-right: {padding_right_value}px;
200
+ padding-bottom: {padding_bottom_value}px;
201
+ border: {border_width}px solid {border_color};
202
+ border-radius: {border_radius}px;
203
+ }}
204
+ QLabel:hover{{
205
+ background-color: {hover_background_color};
206
+ }}
207
+ QLabel:pressed{{
208
+ background-color: {pressed_background_color};
209
+ }}
210
+ QLabel:disabled{{
211
+ color: {disabled_font_color};
212
+ background-color: {disabled_background_color};
213
+ }}
198
214
  """
199
215
  label.setStyleSheet(style)
200
216
  return label
@@ -228,14 +244,26 @@ def create_button(
228
244
  button = QPushButton()
229
245
  button.setMaximumWidth(360)
230
246
  main_layout = QVBoxLayout(button)
231
- label = create_label(text = text, font_size = 16, font_weight = "bold", padding = 0)
247
+ main_layout.setContentsMargins(0, 0, 0, 0)
248
+ label = create_label(
249
+ text = text,
250
+ font_size = font_size,
251
+ font_color = font_color,
252
+ font_weight = "bold",
253
+ background_color = background_color,
254
+ padding = padding,
255
+ padding_left = padding_left,
256
+ padding_top = padding_top,
257
+ padding_right = padding_right,
258
+ padding_bottom = padding_bottom,
259
+ hover_background_color = hover_background_color,
260
+ pressed_background_color = pressed_background_color,
261
+ disabled_font_color = disabled_font_color,
262
+ disabled_background_color = disabled_background_color
263
+ )
232
264
  label.setAlignment(Qt.AlignmentFlag.AlignCenter)
233
265
  label.setWordWrap(True)
234
266
  main_layout.addWidget(label)
235
- padding_left_value = padding_left if padding_left is not None else padding
236
- padding_top_value = padding_top if padding_top is not None else padding
237
- padding_right_value = padding_right if padding_right is not None else padding
238
- padding_bottom_value = padding_bottom if padding_bottom is not None else padding
239
267
  style_sheet = f"""
240
268
  QPushButton {{
241
269
  font-family: {font_family};
@@ -243,10 +271,7 @@ def create_button(
243
271
  color: {font_color};
244
272
  font-weight: {font_weight};
245
273
  background-color: {background_color};
246
- padding-left: {padding_left_value}px;
247
- padding-top: {padding_top_value}px;
248
- padding-right: {padding_right_value}px;
249
- padding-bottom: {padding_bottom_value}px;
274
+ padding: 0px;
250
275
  border: {border_width}px solid {border_color};
251
276
  border-radius: {border_radius}px;
252
277
  }}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gui_utilities
3
- Version: 1.3.6
3
+ Version: 1.3.13
4
4
  Summary: Librería de utilidades gráficas en PyQt6
5
5
  Author-email: Guido Iván Gross <grossguidoivan@gmail.com>
6
6
  Requires-Python: >=3.8
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "gui_utilities"
3
- version = "1.3.6"
3
+ version = "1.3.13"
4
4
  description = "Librería de utilidades gráficas en PyQt6"
5
5
  authors = [{name = "Guido Iván Gross", email = "grossguidoivan@gmail.com"}]
6
6
  requires-python = ">=3.8"
File without changes
File without changes
File without changes