OSDPreviewWidget::OSDPreviewWidget( QWidget *parent ) : OSDWidget( parent ) , m_dragging( false ) { setObjectName( "osdpreview" ); setDuration( 0 ); setImage( Amarok::icon() ); setTranslucent( AmarokConfig::osdUseTranslucency() ); setText( i18n( "On-Screen-Display preview\nDrag to reposition" ) ); }
OSDPreviewWidget::OSDPreviewWidget( QWidget *parent ) : OSDWidget( parent ) , m_dragging( false ) { setObjectName( "osdpreview" ); m_text = i18n( "OSD Preview - drag to reposition" ); m_duration = 0; m_alignment = static_cast<Alignment>( AmarokConfig::osdAlignment() ); m_y = AmarokConfig::osdYOffset(); m_cover = Amarok::icon(); QFont f = font(); f.setPointSize( 16 ); setFont( f ); setTranslucent( AmarokConfig::osdUseTranslucency() ); setText( m_text ); setImage( m_cover ); }
void Amarok::OSD::applySettings() { DEBUG_BLOCK setAlignment( static_cast<OSDWidget::Alignment>( AmarokConfig::osdAlignment() ) ); setDuration( AmarokConfig::osdDuration() ); setEnabled( AmarokConfig::osdEnabled() ); setOffset( AmarokConfig::osdYOffset() ); setScreen( AmarokConfig::osdScreen() ); setFont( AmarokConfig::osdFont() ); if( AmarokConfig::osdUseCustomColors() ) setTextColor( AmarokConfig::osdTextColor() ); else unsetColors(); setTranslucent( AmarokConfig::osdUseTranslucency() ); }