mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 05:49:53 +08:00
small fix
1. Use `Dir::homePath()` when creating QFileDialog; 2. Add `overflow:auto` to `pre` in markdown.css; Signed-off-by: Le Tan <tamlokveer@gmail.com>
This commit is contained in:
parent
f31272966e
commit
359f886732
@ -1,11 +1,12 @@
|
||||
#include <QtWidgets>
|
||||
#include <QDir>
|
||||
#include "vnewnotebookdialog.h"
|
||||
|
||||
VNewNotebookDialog::VNewNotebookDialog(const QString &title, const QString &info,
|
||||
const QString &defaultName, const QString &defaultPath,
|
||||
QWidget *parent)
|
||||
: QDialog(parent), title(title), info(info), defaultName(defaultName), defaultPath(defaultPath),
|
||||
infoLabel(NULL)
|
||||
: QDialog(parent), infoLabel(NULL),
|
||||
title(title), info(info), defaultName(defaultName), defaultPath(defaultPath)
|
||||
{
|
||||
setupUI();
|
||||
|
||||
@ -81,6 +82,6 @@ QString VNewNotebookDialog::getPathInput() const
|
||||
void VNewNotebookDialog::handleBrowseBtnClicked()
|
||||
{
|
||||
QString dirPath = QFileDialog::getExistingDirectory(this, tr("Select a directory as the path of the notebook"),
|
||||
"", QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
|
||||
QDir::homePath(), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks);
|
||||
pathEdit->setText(dirPath);
|
||||
}
|
||||
|
@ -33,8 +33,8 @@ private:
|
||||
QPushButton *cancelBtn;
|
||||
|
||||
QString title;
|
||||
QString defaultName;
|
||||
QString info;
|
||||
QString defaultName;
|
||||
QString defaultPath;
|
||||
};
|
||||
|
||||
|
@ -67,6 +67,7 @@ pre {
|
||||
background-color: #f8f8f8;
|
||||
border-radius: 3px;
|
||||
border: 1px solid #cccccc;
|
||||
overflow: auto;
|
||||
}
|
||||
code {
|
||||
font-family: Consolas, Monaco, Andale Mono, monospace;
|
||||
|
Loading…
x
Reference in New Issue
Block a user