-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding translation for ok/cancel buttons (#918)
- Loading branch information
1 parent
29271ae
commit 0f7d3fd
Showing
3 changed files
with
17 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
import platform | ||
from typing import Optional | ||
|
||
from PyQt6.QtWidgets import QLineEdit, QWidget | ||
from PyQt6.QtWidgets import QLineEdit, QWidget, QSizePolicy | ||
|
||
|
||
class LineEdit(QLineEdit): | ||
def __init__(self, default_text: str = "", parent: Optional[QWidget] = None): | ||
super().__init__(default_text, parent) | ||
if platform.system() == "Darwin": | ||
self.setStyleSheet("QLineEdit { padding: 4px }") | ||
self.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Fixed) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters