Changeset 181 for smplayer/trunk/src/mpcgui/mpcgui.cpp
- Timestamp:
- Aug 31, 2016, 5:31:04 PM (9 years ago)
- Location:
- smplayer/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
smplayer/trunk
- Property svn:mergeinfo changed
/smplayer/vendor/current merged: 179
- Property svn:mergeinfo changed
-
smplayer/trunk/src/mpcgui/mpcgui.cpp
r176 r181 45 45 createStatusBar(); 46 46 createFloatingControl(); 47 populateMainMenu(); 47 48 48 49 retranslateStrings(); … … 70 71 volumeslider_action = createVolumeSliderAction(this); 71 72 volumeslider_action->disable(); 72 73 73 volumeslider_action->setCustomStyle( new MpcVolumeSlideStyle() ); 74 volumeslider_action->setFixedSize( QSize(50,18) ); 74 75 volumeslider_action->setTickPosition( QSlider::NoTicks ); 75 76 #endif 76 77 time_label_action = new TimeLabelAction(this);78 time_label_action->setObjectName("timelabel_action");79 80 connect( this, SIGNAL(timeChanged(QString)),81 time_label_action, SLOT(setText(QString)) );82 77 } 83 78 … … 133 128 void MpcGui::createFloatingControl() { 134 129 // Floating control 135 floating_control = new AutohideWidget( panel);130 floating_control = new AutohideWidget(mplayerwindow); 136 131 floating_control->setAutoHide(true); 137 132 floating_control->hide(); … … 141 136 floating_control_time->setAlignment(Qt::AlignRight); 142 137 floating_control_time->setAutoFillBackground(true); 138 floating_control_time->setObjectName("floating_control_time"); 139 #ifdef CHANGE_WIDGET_COLOR 143 140 ColorUtils::setBackgroundColor( floating_control_time, QColor(0,0,0) ); 144 141 ColorUtils::setForegroundColor( floating_control_time, QColor(255,255,255) ); 145 142 #endif 143 144 connect(this, SIGNAL(timeChanged(QString)), floating_control_time, SLOT(setText(QString))); 146 145 } 147 146 … … 152 151 timeslidewidget->setWindowTitle( tr("Seek bar") ); 153 152 154 153 setupIcons(); 155 154 } 156 155 … … 288 287 289 288 if (!DesktopInfo::isInsideScreen(this)) { 290 move(0,0); 291 qWarning("MpcGui::loadConfig: window is outside of the screen, moved to 0x0"); 289 QPoint tl = DesktopInfo::topLeftPrimaryScreen(); 290 move(tl); 291 qWarning("DefaultGui::loadConfig: window is outside of the screen, moved to %d x %d", tl.x(), tl.y()); 292 292 } 293 293 } … … 316 316 playAct->setCheckable(true); 317 317 stopAct->setCheckable(true); 318 318 319 connect( muteAct, SIGNAL(toggled(bool)), 319 320 this, SLOT(muteIconChange(bool)) ); … … 322 323 this, SLOT(updateAudioChannels()) ); 323 324 324 325 connect( core , SIGNAL(stateChanged(Core::State)), 325 326 this, SLOT(iconChange(Core::State)) ); 326 327 } … … 369 370 370 371 void MpcGui::createStatusBar() { 371 372 372 // remove frames around statusbar items 373 373 statusBar()->setStyleSheet("QStatusBar::item { border: 0px solid black }; "); … … 381 381 audiochannel_display->setMaximumSize(audiochannel_display->sizeHint()); 382 382 audiochannel_display->setPixmap( QPixmap("") ); 383 383 384 384 time_display = new QLabel( statusBar() ); 385 385 time_display->setAlignment(Qt::AlignRight); 386 386 time_display->setText(" 88:88:88 / 88:88:88 "); 387 387 time_display->setMinimumSize(time_display->sizeHint()); 388 388 time_display->setContentsMargins(15,2,1,1); 389 389 390 390 frame_display = new QLabel( statusBar() ); … … 392 392 frame_display->setText("88888888"); 393 393 frame_display->setMinimumSize(frame_display->sizeHint()); 394 frame_display->setContentsMargins(15,2,1,1); 395 396 statusBar()->setAutoFillBackground(TRUE); 397 394 frame_display->setContentsMargins(15,2,1,1); 395 396 statusBar()->setAutoFillBackground(true); 397 398 #ifdef CHANGE_WIDGET_COLOR 398 399 ColorUtils::setBackgroundColor( statusBar(), QColor(0,0,0) ); 399 400 ColorUtils::setForegroundColor( statusBar(), QColor(255,255,255) ); … … 404 405 ColorUtils::setBackgroundColor( audiochannel_display, QColor(0,0,0) ); 405 406 ColorUtils::setForegroundColor( audiochannel_display, QColor(255,255,255) ); 406 statusBar()->setSizeGripEnabled(FALSE); 407 408 407 #endif 408 409 statusBar()->setSizeGripEnabled(false); 409 410 410 411 statusBar()->addPermanentWidget( frame_display, 0 ); 411 412 frame_display->setText( "0" ); 412 413 413 414 statusBar()->addPermanentWidget( time_display, 0 ); 414 415 time_display->setText(" 00:00:00 / 00:00:00 "); 415 416 416 417 statusBar()->addPermanentWidget( audiochannel_display, 0 ); 417 418 418 419 time_display->show(); 419 420 frame_display->hide(); 420 421 421 connect( this, SIGNAL(timeChanged(QString)), 422 this, SLOT(displayTime(QString)) ); 423 424 connect( this, SIGNAL(frameChanged(int)), 425 this, SLOT(displayFrame(int)) ); 426 } 427 428 void MpcGui::displayTime(QString text) { 429 time_display->setText( text ); 430 time_label_action->setText(text ); 431 floating_control_time->setText(text); 422 connect(this, SIGNAL(timeChanged(QString)), time_display, SLOT(setText(QString))); 423 connect(this, SIGNAL(frameChanged(int)), this, SLOT(displayFrame(int))); 432 424 } 433 425 … … 452 444 !pref->compact_mode ) 453 445 { 454 446 controlwidget->show(); 455 447 timeslidewidget->show(); 456 448 statusBar()->show(); … … 501 493 502 494 void MpcGui::updateWidgets() { 503 504 BaseGui::updateWidgets(); 495 BaseGui::updateWidgets(); 505 496 506 497 // Frame counter
Note:
See TracChangeset
for help on using the changeset viewer.