added icons
1
icons/material_close.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" height="48" width="48"><path fill="#eda65a" d="m12.45 37.65-2.1-2.1L21.9 24 10.35 12.45l2.1-2.1L24 21.9l11.55-11.55 2.1 2.1L26.1 24l11.55 11.55-2.1 2.1L24 26.1Z"/></svg>
|
After Width: | Height: | Size: 211 B |
1
icons/material_info.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" height="48" width="48"><path fill="#eda65a" d="M22.65 34h3V22h-3ZM24 18.3q.7 0 1.175-.45.475-.45.475-1.15t-.475-1.2Q24.7 15 24 15q-.7 0-1.175.5-.475.5-.475 1.2t.475 1.15q.475.45 1.175.45ZM24 44q-4.1 0-7.75-1.575-3.65-1.575-6.375-4.3-2.725-2.725-4.3-6.375Q4 28.1 4 23.95q0-4.1 1.575-7.75 1.575-3.65 4.3-6.35 2.725-2.7 6.375-4.275Q19.9 4 24.05 4q4.1 0 7.75 1.575 3.65 1.575 6.35 4.275 2.7 2.7 4.275 6.35Q44 19.85 44 24q0 4.1-1.575 7.75-1.575 3.65-4.275 6.375t-6.35 4.3Q28.15 44 24 44Zm.05-3q7.05 0 12-4.975T41 23.95q0-7.05-4.95-12T24 7q-7.05 0-12.025 4.95Q7 16.9 7 24q0 7.05 4.975 12.025Q16.95 41 24.05 41ZM24 24Z"/></svg>
|
After Width: | Height: | Size: 662 B |
1
icons/material_invite.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" height="48" width="48"><path fill="#eda65a" d="M36.5 28v-6.5H30v-3h6.5V12h3v6.5H46v3h-6.5V28ZM18 23.95q-3.3 0-5.4-2.1-2.1-2.1-2.1-5.4 0-3.3 2.1-5.4 2.1-2.1 5.4-2.1 3.3 0 5.4 2.1 2.1 2.1 2.1 5.4 0 3.3-2.1 5.4-2.1 2.1-5.4 2.1ZM2 40v-4.7q0-1.75.875-3.175Q3.75 30.7 5.4 30q3.75-1.65 6.675-2.325Q15 27 18 27t5.9.675q2.9.675 6.65 2.325 1.65.75 2.55 2.15.9 1.4.9 3.15V40Zm3-3h26v-1.7q0-.8-.45-1.525-.45-.725-1.2-1.075-3.55-1.65-6-2.175Q20.9 30 18 30q-2.9 0-5.375.525T6.6 32.7q-.75.35-1.175 1.075Q5 34.5 5 35.3Zm13-16.05q1.95 0 3.225-1.275Q22.5 18.4 22.5 16.45q0-1.95-1.275-3.225Q19.95 11.95 18 11.95q-1.95 0-3.225 1.275Q13.5 14.5 13.5 16.45q0 1.95 1.275 3.225Q16.05 20.95 18 20.95Zm0-4.5ZM18 37Z"/></svg>
|
After Width: | Height: | Size: 739 B |
1
icons/material_thank.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" height="48" width="48"><path fill="#eda65a" d="M35.8 42H13.6V16.4L27.5 2l1.95 1.55q.3.25.45.7.15.45.15 1.1v.5L27.8 16.4h14.95q1.2 0 2.1.9.9.9.9 2.1v4.1q0 .35.075.725t-.075.725l-6.3 14.5q-.45 1.05-1.475 1.8Q36.95 42 35.8 42Zm-19.2-3h19.85l6.3-14.95V19.4H24.1l2.65-12.45-10.15 10.7Zm0-21.35V39Zm-3-1.25v3H6.95V39h6.65v3H3.95V16.4Z"/></svg>
|
After Width: | Height: | Size: 379 B |
1
icons/material_trade.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" height="48" width="48"><path fill="#eda65a" d="m12 42-7.65-7.65L12 26.7l2.45 2.45L11 32.6h26l-3.45-3.45L36 26.7l7.65 7.65L36 42l-2.45-2.45L37 36.1H11l3.45 3.45ZM4.95 21.25v-.65q0-1.05.575-1.925T7.1 17.35q1.25-.55 2.575-.825Q11 16.25 12.45 16.25t2.775.275q1.325.275 2.575.825 1 .45 1.575 1.325t.575 1.925v.65Zm23.1 0v-.65q0-1.05.575-1.925T30.2 17.35q1.25-.55 2.575-.825 1.325-.275 2.775-.275t2.775.275q1.325.275 2.575.825 1 .45 1.575 1.325t.575 1.925v.65Zm-15.6-7.75q-1.55 0-2.65-1.1-1.1-1.1-1.1-2.65 0-1.55 1.1-2.65Q10.9 6 12.45 6 14 6 15.1 7.1q1.1 1.1 1.1 2.65 0 1.55-1.1 2.65-1.1 1.1-2.65 1.1Zm23.1 0q-1.55 0-2.65-1.1-1.1-1.1-1.1-2.65 0-1.55 1.1-2.65Q34 6 35.55 6q1.55 0 2.65 1.1 1.1 1.1 1.1 2.65 0 1.55-1.1 2.65-1.1 1.1-2.65 1.1Z"/></svg>
|
After Width: | Height: | Size: 783 B |
1
icons/material_wait.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" height="48" width="48"><path fill="#eda65a" d="M23.85 42q-7.45 0-12.65-5.275T6 23.95h3q0 6.25 4.3 10.65T23.85 39q6.35 0 10.75-4.45t4.4-10.8q0-6.2-4.45-10.475Q30.1 9 23.85 9q-3.4 0-6.375 1.55t-5.175 4.1h5.25v3H7.1V7.25h3v5.3q2.6-3.05 6.175-4.8Q19.85 6 23.85 6q3.75 0 7.05 1.4t5.775 3.825q2.475 2.425 3.9 5.675Q42 20.15 42 23.9t-1.425 7.05q-1.425 3.3-3.9 5.75-2.475 2.45-5.775 3.875Q27.6 42 23.85 42Zm6.4-9.85-7.7-7.6v-10.7h3v9.45L32.4 30Z"/></svg>
|
After Width: | Height: | Size: 488 B |
1
icons/material_wait2.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" height="48" width="48"><path fill="#eda65a" d="M15.8 41h16.4v-6.35q0-3.5-2.375-6.025Q27.45 26.1 24 26.1t-5.825 2.525Q15.8 31.15 15.8 34.65ZM24 21.9q3.45 0 5.825-2.525T32.2 13.3V7H15.8v6.3q0 3.55 2.375 6.075Q20.55 21.9 24 21.9ZM8 44v-3h4.8v-6.35q0-3.5 1.825-6.425T19.7 24q-3.25-1.3-5.075-4.25Q12.8 16.8 12.8 13.3V7H8V4h32v3h-4.8v6.3q0 3.5-1.825 6.45T28.3 24q3.25 1.3 5.075 4.225Q35.2 31.15 35.2 34.65V41H40v3Z"/></svg>
|
After Width: | Height: | Size: 459 B |
1
icons/material_whisper.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" height="48" width="48"><path fill="#eda65a" d="M4 44V7q0-1.15.9-2.075Q5.8 4 7 4h34q1.15 0 2.075.925Q44 5.85 44 7v26q0 1.15-.925 2.075Q42.15 36 41 36H12Zm3-7.25L10.75 33H41V7H7ZM7 7v29.75Z"/></svg>
|
After Width: | Height: | Size: 238 B |
@ -71,7 +71,7 @@ class MainWindow(QMainWindow):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
super().__init__()
|
super().__init__()
|
||||||
|
|
||||||
# self.setWindowFlag(QtCore.Qt.FramelessWindowHint)
|
self.setWindowFlag(QtCore.Qt.FramelessWindowHint)
|
||||||
self.setWindowFlag(QtCore.Qt.WindowStaysOnTopHint)
|
self.setWindowFlag(QtCore.Qt.WindowStaysOnTopHint)
|
||||||
self.setAttribute(QtCore.Qt.WA_TranslucentBackground)
|
self.setAttribute(QtCore.Qt.WA_TranslucentBackground)
|
||||||
|
|
||||||
@ -96,7 +96,12 @@ class MainWindow(QMainWindow):
|
|||||||
|
|
||||||
def start_app():
|
def start_app():
|
||||||
app = QApplication(sys.argv)
|
app = QApplication(sys.argv)
|
||||||
qdarktheme.setup_theme()
|
qss = """QToolTip {
|
||||||
|
background-color: black;
|
||||||
|
color: white;
|
||||||
|
border: black solid 1px
|
||||||
|
}"""
|
||||||
|
qdarktheme.setup_theme(additional_qss=qss, custom_colors={"primary": "#eda65a"})
|
||||||
# app.setStyle('Material')
|
# app.setStyle('Material')
|
||||||
|
|
||||||
window = MainWindow()
|
window = MainWindow()
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
from PySide6.QtWidgets import QPushButton, QHBoxLayout, QVBoxLayout, QWidget, QLabel, QSizePolicy, QFrame
|
from PySide6.QtWidgets import QPushButton, QHBoxLayout, QVBoxLayout, QWidget, QLabel, QSizePolicy, QFrame
|
||||||
from PySide6 import QtCore
|
from PySide6 import QtCore
|
||||||
|
from PySide6.QtGui import QIcon
|
||||||
from src.data import Message
|
from src.data import Message
|
||||||
from src import sendkeys
|
from src import sendkeys
|
||||||
from src.data import log
|
from src.data import log
|
||||||
@ -23,18 +24,21 @@ class TradeWidget(QWidget):
|
|||||||
self.setLayout(self.main_layout)
|
self.setLayout(self.main_layout)
|
||||||
assert message.trade
|
assert message.trade
|
||||||
|
|
||||||
self.inv_button = self.new_button('inv', self.inv_callback)
|
self.inv_button = self.new_button('icons/material_invite.svg', 'Invite', self.inv_callback)
|
||||||
self.trade_button = self.new_button('trade', self.trade_callback)
|
self.trade_button = self.new_button('icons/material_trade.svg', 'Trade', self.trade_callback)
|
||||||
self.thank_button = self.new_button('thank', self.thank_callback)
|
self.thank_button = self.new_button('icons/material_thank.svg', 'Thank you', self.thank_callback)
|
||||||
self.wait_button = self.new_button('wait', self.wait_callback)
|
self.wait_button = self.new_button('icons/material_wait2.svg', 'Busy', self.wait_callback)
|
||||||
self.close_button = self.new_button('X', self.close_callback)
|
self.close_button = self.new_button('icons/material_close.svg', 'Dismiss', self.close_callback)
|
||||||
|
|
||||||
self.label_item = self.new_Label(message.trade.item)
|
self.label_item = self.new_Label(message.trade.item)
|
||||||
self.label_price = self.new_Label(f'{message.trade.amount} {message.trade.currency}')
|
self.label_price = self.new_Label(f'{message.trade.amount} {message.trade.currency}')
|
||||||
self.label_user = self.new_Label(message.user)
|
self.label_user = self.new_Label(message.user)
|
||||||
|
self.label_tab = self.new_Label(message.trade.tab)
|
||||||
|
|
||||||
def new_button(self, text: str, callback: Callable[[], None]) -> QPushButton:
|
def new_button(self, icon_filename: str, tooltip: str, callback: Callable[[], None]) -> QPushButton:
|
||||||
button = QPushButton(text)
|
icon = QIcon(icon_filename)
|
||||||
|
button = QPushButton(icon=icon, text='', parent=self)
|
||||||
|
button.setToolTip(tooltip)
|
||||||
button.setSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Fixed)
|
button.setSizePolicy(QSizePolicy.Policy.Fixed, QSizePolicy.Policy.Fixed)
|
||||||
button.setContentsMargins(0, 0, 0, 0)
|
button.setContentsMargins(0, 0, 0, 0)
|
||||||
button.clicked.connect(callback)
|
button.clicked.connect(callback)
|
||||||
@ -42,7 +46,7 @@ class TradeWidget(QWidget):
|
|||||||
return button
|
return button
|
||||||
|
|
||||||
def new_Label(self, text: str) -> QLabel:
|
def new_Label(self, text: str) -> QLabel:
|
||||||
label = QLabel(text)
|
label = QLabel(text, self)
|
||||||
label.setFrameStyle(QFrame.Panel | QFrame.Sunken)
|
label.setFrameStyle(QFrame.Panel | QFrame.Sunken)
|
||||||
label.setAlignment(QtCore.Qt.AlignLeft)
|
label.setAlignment(QtCore.Qt.AlignLeft)
|
||||||
self.main_layout.addWidget(label)
|
self.main_layout.addWidget(label)
|
||||||
|