Skip to content

Commit

Permalink
Small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alesapin committed May 2, 2016
1 parent 509e7b0 commit d79e064
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
4 changes: 4 additions & 0 deletions Patterns/patternsbasicwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,21 @@ void PatternsBasicWidget::initPatternEditor()
{
QMainWindow* wrapper = new QMainWindow();
QToolBar* buttonBar = new QToolBar(this);

buttonBar->setMovable(false);
buttonBar->setFloatable(false);
compileButton = new QPushButton(tr("Скомпилировать"),this);
clearAllButton= new QPushButton(tr("Удалить всё"),this);
addButton = new QPushButton(tr("Добавить"),this);
buttonBar->addWidget(compileButton);
buttonBar->addWidget(clearAllButton);
QWidget* container =new QWidget(this);
QVBoxLayout* lay = new QVBoxLayout(container);
lay->setContentsMargins(0,0,0,0);
list = new PatternsList(comp,this);
editor = new PatternEditor(this);
connect(compileButton,SIGNAL(clicked(bool)),list,SLOT(slotCompilePatterns()));
connect(clearAllButton,SIGNAL(clicked(bool)),this,SLOT(slotClearPatterns()));
connect(addButton,SIGNAL(clicked(bool)),this,SLOT(slotAddPattern()));
connect(list,SIGNAL(editPatternSignal(QString)),editor,SLOT(setText(QString)));
QHBoxLayout* line = new QHBoxLayout();
Expand Down
1 change: 1 addition & 0 deletions Patterns/patternsbasicwidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class PatternsBasicWidget : public BasicWidget
PatternEditor* editor;
QPushButton* compileButton;
QPushButton* addButton;
QPushButton* clearAllButton;
PatternCompiler* comp;
PatternsList* list;
void initPatternEditor();
Expand Down
2 changes: 1 addition & 1 deletion Text/texttabedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void TextTabEdit::setReadOnly(bool f)
MatchTextViewer* current = getCurrentWidget();
if(current){
if(f){
current->setStyleSheet("QPlainTextEdit {background-color: rgb(0, 255, 0,20%)}");
current->setStyleSheet("QPlainTextEdit {background-color: rgb(0, 255, 0,10%)}");
}else{
current->setStyleSheet("QPlainTextEdit {background-color: rgb(255, 255, 255)}");
current->setMatches(QSharedPointer<utility::IntervalViewMap>(new utility::IntervalViewMap));
Expand Down
13 changes: 11 additions & 2 deletions stylesheet.qss
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,18 @@ QPushButton {
border-radius: 2px;
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #F5E4D3, stop: 1 #F0BF8D);
color: #4A4641;
/* font-weight: bold;*/
}

QPushButton:pressed {
border: 2px solid #8b8989;
border-radius: 2px;
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #F5E4D3, stop: 1 #F0BF8D);
}
QPushButton:hover:!pressed {
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #F7EBDF, stop: 1 #F5CCA4);
}
QPushButton:disabled {
background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #B7C1C4, stop: 1 #9EA9AD);
}
/*QProgressBar {
border: 1px solid #8b8989;
border-radius: 4px;
Expand Down

0 comments on commit d79e064

Please sign in to comment.