void PaletteEditorAdvanced::onToggleBuildEffects( bool on ) { if (!on) return; buildActiveEffect(); buildInactiveEffect(); buildDisabledEffect(); }
void PaletteEditor::buildPalette() { int i; QColorGroup cg; QColor btn = buttonMainColor->color(); QColor back = buttonMainColor2->color(); QPalette automake( btn, back ); for (i = 0; i<9; i++) cg.setColor( centralFromItem(i), automake.active().color( centralFromItem(i) ) ); editPalette.setActive( cg ); buildActiveEffect(); cg = editPalette.inactive(); QPalette temp( editPalette.active().color( QColorGroup::Button ), editPalette.active().color( QColorGroup::Background ) ); for (i = 0; i<9; i++) cg.setColor( centralFromItem(i), temp.inactive().color( centralFromItem(i) ) ); editPalette.setInactive( cg ); buildInactiveEffect(); cg = editPalette.disabled(); for (i = 0; i<9; i++) cg.setColor( centralFromItem(i), temp.disabled().color( centralFromItem(i) ) ); editPalette.setDisabled( cg ); buildDisabledEffect(); updateStyledButtons(); }
void PaletteEditor::buildDisabled() { QColorGroup cg = editPalette.active(); cg.setColor( QColorGroup::ButtonText, darkGray ); cg.setColor( QColorGroup::Foreground, darkGray ); editPalette.setDisabled( cg ); buildDisabledEffect(); }
void PaletteEditorAdvanced::mapToDisabledCentralRole( const QColor& c ) { QColorGroup cg = editPalette.disabled(); cg.setColor( centralFromItem(comboCentral->currentItem()), c ); editPalette.setDisabled( cg ); buildDisabledEffect(); setPreviewPalette( editPalette ); }
void MainWindow::buildDisabled() { QColorGroup cg = editPalette.active(); cg.setColor( QColorGroup::ButtonText, Qt::darkGray ); cg.setColor( QColorGroup::WindowText, Qt::darkGray ); cg.setColor( QColorGroup::Text, Qt::darkGray ); cg.setColor( QColorGroup::HighlightedText, Qt::darkGray ); editPalette.setDisabled( cg ); buildDisabledEffect(); }
void PaletteEditorAdvanced::buildDisabled() { QColorGroup cg = editPalette.active(); cg.setColor( QColorGroup::ButtonText, darkGray ); cg.setColor( QColorGroup::Foreground, darkGray ); cg.setColor( QColorGroup::Text, darkGray ); cg.setColor( QColorGroup::HighlightedText, darkGray ); editPalette.setDisabled( cg ); if ( checkBuildEffect->isChecked() ) buildDisabledEffect(); else { setPreviewPalette( editPalette ); updateColorButtons(); } }