Skip to content

Commit

Permalink
chore(editor):
Browse files Browse the repository at this point in the history
1.Solve the problem that the shortcut key "scroll up one page" and "scroll down one page" are empty;
2.Solve the problem of incomplete display of floating window after exiting the full screen;
  • Loading branch information
n013121 committed Dec 11, 2019
1 parent 126023f commit b30f3ab
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 23 deletions.
6 changes: 0 additions & 6 deletions src/fileloadthread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ void FileLoadThread::run()
if (file.open(QIODevice::ReadOnly)) {
// reads all remaining data from the file.
QByteArray fileContent = file.readAll();
// QByteArray detectArray = fileContent;

// if (fileContent.size() > 10000) {
// // use fixed byte detection encoding.
// detectArray.truncate(10000);
// }

// read the encode.
QByteArray encode = Utils::detectEncode(fileContent);
Expand Down
9 changes: 0 additions & 9 deletions src/findbar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,6 @@ FindBar::FindBar(QWidget *parent)
m_closeButton->setFixedSize(25, 25);
m_layout->setContentsMargins(16, 4, 11, 4);

// QFont font;
// font.setFamily("SourceHanSansSC-Medium");
// font.setPixelSize(14);
// m_findLabel->setFont(font);
// m_editLine->lineEdit()->setFont(font);
// m_findPrevButton->setFont(font);
// m_findNextButton->setFont(font);

m_layout->addWidget(m_findLabel);
m_layout->addWidget(m_editLine);
m_layout->addWidget(m_findPrevButton);
Expand Down Expand Up @@ -114,7 +106,6 @@ void FindBar::activeInput(QString text, QString file, int row, int column, int s
void FindBar::findCancel()
{
QWidget::hide();
//add by guoshaoyu
emit sigFindbarClose();
}

Expand Down
12 changes: 6 additions & 6 deletions src/resources/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,13 @@
"key": "scrollup",
"name": "Page up",
"type": "shortcut",
"default": "PageUp"
"default": "PgUp"
},
{
"key": "scrolldown",
"name": "Page down",
"type": "shortcut",
"default": "PageDown"
"default": "PgDown"
},
{
"key": "movetoendofline",
Expand Down Expand Up @@ -749,13 +749,13 @@
"key": "scrollup",
"hide" : true,
"reset" : false,
"default": "PageUp"
"default": "PgUp"
},
{
"key": "scrolldown",
"hide" : true,
"reset" : false,
"default": "PageDown"
"default": "PgDown"
},
{
"key": "movetoendofline",
Expand Down Expand Up @@ -1665,13 +1665,13 @@
"key": "scrollup",
"hide" : true,
"reset" : false,
"default": "PageUp"
"default": "PgUp"
},
{
"key": "scrolldown",
"hide" : true,
"reset" : false,
"default": "PageDown"
"default": "PgDown"
},
{
"key": "movetoendofline",
Expand Down
4 changes: 2 additions & 2 deletions src/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,14 +166,14 @@ Window::Window(DMainWindow *parent)
// Init findbar panel.
DAnchors<FindBar> anchors_findbar(m_findBar);
anchors_findbar.setAnchor(Qt::AnchorBottom, m_centralWidget, Qt::AnchorBottom);
anchors_findbar.setAnchor(Qt::AnchorHorizontalCenter, m_centralWidget, Qt::AnchorHorizontalCenter);
//anchors_findbar.setAnchor(Qt::AnchorHorizontalCenter, m_centralWidget, Qt::AnchorHorizontalCenter);
anchors_findbar.setBottomMargin(5);
m_findBar->raise();

// Init replaceBar panel.
DAnchors<ReplaceBar> anchors_replaceBar(m_replaceBar);
anchors_replaceBar.setAnchor(Qt::AnchorBottom, m_centralWidget, Qt::AnchorBottom);
anchors_replaceBar.setAnchor(Qt::AnchorHorizontalCenter, m_centralWidget, Qt::AnchorHorizontalCenter);
//anchors_replaceBar.setAnchor(Qt::AnchorHorizontalCenter, m_centralWidget, Qt::AnchorHorizontalCenter);
anchors_replaceBar.setBottomMargin(5);
anchors_replaceBar->raise();

Expand Down

0 comments on commit b30f3ab

Please sign in to comment.