| 67 | const int StyleEditDialog::mErrLineNum = 16; |
| 68 | |
| 69 | StyleEditDialog::StyleEditDialog(const CodeEditorStyle& newStyle, |
| 70 | QWidget *parent /*= nullptr*/) : |
| 71 | QDialog(parent), |
| 72 | mStyleIncoming(newStyle), |
| 73 | mStyleOutgoing(newStyle) |
| 74 | { |
| 75 | auto *vboxMain = new QVBoxLayout(this); |
| 76 | auto *hboxEdit = new QHBoxLayout(); |
| 77 | // Color/Weight controls |
| 78 | auto *flEditControls = new QFormLayout(); |
| 79 | mBtnWidgetColorFG = new SelectColorButton(this); |
| 80 | flEditControls->addRow(QObject::tr("Editor Foreground Color"), |
| 81 | mBtnWidgetColorFG); |
| 82 | mBtnWidgetColorBG = new SelectColorButton(this); |
| 83 | flEditControls->addRow(QObject::tr("Editor Background Color"), |
| 84 | mBtnWidgetColorBG); |
| 85 | mBtnHighlightBG = new SelectColorButton(this); |
| 86 | flEditControls->addRow(QObject::tr("Highlight Background Color"), |
| 87 | mBtnHighlightBG); |
| 88 | mBtnLineNumFG = new SelectColorButton(this); |
| 89 | flEditControls->addRow(QObject::tr("Line Number Foreground Color"), |
| 90 | mBtnLineNumFG); |
| 91 | mBtnLineNumBG = new SelectColorButton(this); |
| 92 | flEditControls->addRow(QObject::tr("Line Number Background Color"), |
| 93 | mBtnLineNumBG); |
| 94 | mBtnKeywordFG = new SelectColorButton(this); |
| 95 | flEditControls->addRow(QObject::tr("Keyword Foreground Color"), |
| 96 | mBtnKeywordFG); |
| 97 | mCBKeywordWeight = new SelectFontWeightCombo(this); |
| 98 | flEditControls->addRow(QObject::tr("Keyword Font Weight"), |
| 99 | mCBKeywordWeight); |
| 100 | mBtnClassFG = new SelectColorButton(this); |
| 101 | flEditControls->addRow(QObject::tr("Class Foreground Color"), |
| 102 | mBtnClassFG); |
| 103 | mCBClassWeight = new SelectFontWeightCombo(this); |
| 104 | flEditControls->addRow(QObject::tr("Class Font Weight"), |
| 105 | mCBClassWeight); |
| 106 | mBtnQuoteFG = new SelectColorButton(this); |
| 107 | flEditControls->addRow(QObject::tr("Quote Foreground Color"), |
| 108 | mBtnQuoteFG); |
| 109 | mCBQuoteWeight = new SelectFontWeightCombo(this); |
| 110 | flEditControls->addRow(QObject::tr("Quote Font Weight"), |
| 111 | mCBQuoteWeight); |
| 112 | mBtnCommentFG = new SelectColorButton(this); |
| 113 | flEditControls->addRow(QObject::tr("Comment Foreground Color"), |
| 114 | mBtnCommentFG); |
| 115 | mCBCommentWeight = new SelectFontWeightCombo(this); |
| 116 | flEditControls->addRow(QObject::tr("Comment Font Weight"), |
| 117 | mCBCommentWeight); |
| 118 | mBtnSymbolFG = new SelectColorButton(this); |
| 119 | flEditControls->addRow(QObject::tr("Symbol Foreground Color"), |
| 120 | mBtnSymbolFG); |
| 121 | mBtnSymbolBG = new SelectColorButton(this); |
| 122 | flEditControls->addRow(QObject::tr("Symbol Background Color"), |
| 123 | mBtnSymbolBG); |
| 124 | mCBSymbolWeight = new SelectFontWeightCombo(this); |
| 125 | flEditControls->addRow(QObject::tr("Symbol Font Weight"), |
| 126 | mCBSymbolWeight); |