11
11
QMenu , QListWidgetItem , QTableWidget , QTableWidgetItem , QHeaderView , QTabWidget , QTextEdit , QSizePolicy , QToolButton , QShortcut , QCheckBox , QGroupBox # Added QGroupBox here
12
12
)
13
13
from PyQt5 .QtCore import Qt , QSize , QTimer , QPropertyAnimation , QEasingCurve , QAbstractAnimation , QRect , QCoreApplication
14
- from PyQt5 .QtGui import QIcon , QPainter , QColor , QKeySequence
14
+ from PyQt5 .QtGui import QIcon , QPainter , QColor , QKeySequence , QPalette
15
15
import json
16
16
import requests
17
17
# Replace this line:
@@ -448,12 +448,21 @@ def setup_ui(self):
448
448
self .password_input = QLineEdit ()
449
449
self .password_input .setEchoMode (QLineEdit .Password )
450
450
451
+ # Style placeholder text
452
+ placeholder_color = QColor (100 , 100 , 100 ) # Dark gray color
453
+ palette = self .palette ()
454
+ palette .setColor (QPalette .PlaceholderText , placeholder_color )
455
+ self .setPalette (palette )
456
+
457
+ # Apply placeholder text
451
458
layout .addRow ("Name:" , self .name_input )
452
459
self .name_input .setPlaceholderText ("My Server" )
453
460
layout .addRow ("Server address:" , self .url_input )
454
461
self .url_input .setPlaceholderText ("http://127.0.0.1:9981" )
455
462
layout .addRow ("Username:" , self .username_input )
463
+ self .username_input .setPlaceholderText ("Optional" )
456
464
layout .addRow ("Password:" , self .password_input )
465
+ self .password_input .setPlaceholderText ("Optional" )
457
466
458
467
buttons = QDialogButtonBox (
459
468
QDialogButtonBox .Ok | QDialogButtonBox .Cancel
@@ -1359,6 +1368,13 @@ def custom_show_message(message, timeout=0):
1359
1368
search_layout = QHBoxLayout ()
1360
1369
search_icon = QLabel ("🔍" ) # Unicode search icon
1361
1370
self .search_box = QLineEdit ()
1371
+
1372
+ # Style placeholder text
1373
+ placeholder_color = QColor (100 , 100 , 100 ) # Dark gray color
1374
+ search_palette = self .search_box .palette ()
1375
+ search_palette .setColor (QPalette .PlaceholderText , placeholder_color )
1376
+ self .search_box .setPalette (search_palette )
1377
+
1362
1378
self .search_box .setPlaceholderText ("Press S to search channels..." )
1363
1379
self .search_box .textChanged .connect (self .filter_channels )
1364
1380
self .search_box .setClearButtonEnabled (True ) # Add clear button inside search box
@@ -1376,42 +1392,7 @@ def custom_show_message(message, timeout=0):
1376
1392
left_layout .addLayout (search_layout ) # Add to left pane layout
1377
1393
1378
1394
# Now style the search box with custom clear button styling
1379
- self .search_box .setStyleSheet ("""
1380
- QLineEdit {
1381
- padding: 6px;
1382
- padding-right: 25px; /* Make room for clear button */
1383
- border: 1px solid #ccc;
1384
- border-radius: 4px;
1385
- background-color: white;
1386
- }
1387
- QLineEdit:focus {
1388
- border-color: #0078d4;
1389
- }
1390
- QLineEdit::placeholder {
1391
- color: #555;
1392
- font-weight: bold;
1393
- opacity: 0.8;
1394
- }
1395
- QLineEdit QToolButton { /* Style for the clear button */
1396
- background: none;
1397
- border: none;
1398
- padding: 0px 6px;
1399
- color: #666;
1400
- font-size: 16px;
1401
- }
1402
- QLineEdit QToolButton:hover {
1403
- background-color: #e0e0e0;
1404
- border-radius: 2px;
1405
- }
1406
- """ )
1407
1395
1408
- # Style the search icon
1409
- search_icon .setStyleSheet ("""
1410
- QLabel {
1411
- color: #666;
1412
- padding: 0 5px;
1413
- }
1414
- """ )
1415
1396
1416
1397
# Add margins to search layout
1417
1398
search_layout .setContentsMargins (0 , 5 , 0 , 5 )
@@ -1900,7 +1881,7 @@ def show_about(self):
1900
1881
about_text = (
1901
1882
"<div style='text-align: center;'>"
1902
1883
"<h2>TVHplayer</h2>"
1903
- "<p>Version 3.5.3 </p>"
1884
+ "<p>Version 3.5.4 </p>"
1904
1885
"<p>A powerful and user-friendly TVHeadend client application.</p>"
1905
1886
"<p style='margin-top: 20px;'><b>Created by:</b><br>mFat</p>"
1906
1887
"<p style='margin-top: 20px;'><b>Built with:</b><br>"
0 commit comments