mirror of
https://github.com/KDE/konsole.git
synced 2026-05-19 12:09:25 -04:00
Changing styling in accordance with KDE styling guidelines + comments
Patch by renan fargetton renan.fargetton@gmail.com REVIEW: 110532
This commit is contained in:
@@ -124,18 +124,21 @@ ColorSchemeEditor::~ColorSchemeEditor()
|
||||
void ColorSchemeEditor::editColorItem(QTableWidgetItem* item)
|
||||
{
|
||||
// ignore if this is not a color column
|
||||
if (item->column() != COLOR_COLUMN && item->column() != INTENSE_COLOR_COLUMN)
|
||||
return;
|
||||
if (item->column() != COLOR_COLUMN && item->column() != INTENSE_COLOR_COLUMN) {
|
||||
return;
|
||||
}
|
||||
|
||||
QColor color = item->background().color();
|
||||
int result = KColorDialog::getColor(color);
|
||||
|
||||
if (result == KColorDialog::Accepted) {
|
||||
item->setBackground(color);
|
||||
|
||||
int colorSchemeRow = item->row();
|
||||
int colorSchemeRow = item->row();
|
||||
// Intense colors row are in the bottom half of the color table
|
||||
if (item->column() == INTENSE_COLOR_COLUMN)
|
||||
if (item->column() == INTENSE_COLOR_COLUMN) {
|
||||
colorSchemeRow += COLOR_TABLE_ROW_LENGTH;
|
||||
}
|
||||
|
||||
ColorEntry entry(_colors->colorEntry(colorSchemeRow));
|
||||
entry.color = color;
|
||||
|
||||
@@ -685,8 +685,8 @@ void EditProfileDialog::removeColorScheme()
|
||||
}
|
||||
void EditProfileDialog::showColorSchemeEditor(bool isNewScheme)
|
||||
{
|
||||
// Finding selected ColorScheme
|
||||
QModelIndexList selected = _ui->colorSchemeList->selectionModel()->selectedIndexes();
|
||||
|
||||
QAbstractItemModel* model = _ui->colorSchemeList->model();
|
||||
const ColorScheme* colors = 0;
|
||||
if (!selected.isEmpty())
|
||||
@@ -696,6 +696,7 @@ void EditProfileDialog::showColorSchemeEditor(bool isNewScheme)
|
||||
|
||||
Q_ASSERT(colors);
|
||||
|
||||
// Setting up ColorSchemeEditor ui
|
||||
QWeakPointer<KDialog> dialog = new KDialog(this);
|
||||
|
||||
if (isNewScheme)
|
||||
|
||||
Reference in New Issue
Block a user