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 <QtWidgets>
|
||||||
|
#include <QDir>
|
||||||
#include "vnewnotebookdialog.h"
|
#include "vnewnotebookdialog.h"
|
||||||
|
|
||||||
VNewNotebookDialog::VNewNotebookDialog(const QString &title, const QString &info,
|
VNewNotebookDialog::VNewNotebookDialog(const QString &title, const QString &info,
|
||||||
const QString &defaultName, const QString &defaultPath,
|
const QString &defaultName, const QString &defaultPath,
|
||||||
QWidget *parent)
|
QWidget *parent)
|
||||||
: QDialog(parent), title(title), info(info), defaultName(defaultName), defaultPath(defaultPath),
|
: QDialog(parent), infoLabel(NULL),
|
||||||
infoLabel(NULL)
|
title(title), info(info), defaultName(defaultName), defaultPath(defaultPath)
|
||||||
{
|
{
|
||||||
setupUI();
|
setupUI();
|
||||||
|
|
||||||
@ -81,6 +82,6 @@ QString VNewNotebookDialog::getPathInput() const
|
|||||||
void VNewNotebookDialog::handleBrowseBtnClicked()
|
void VNewNotebookDialog::handleBrowseBtnClicked()
|
||||||
{
|
{
|
||||||
QString dirPath = QFileDialog::getExistingDirectory(this, tr("Select a directory as the path of the notebook"),
|
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);
|
pathEdit->setText(dirPath);
|
||||||
}
|
}
|
||||||
|
@ -33,8 +33,8 @@ private:
|
|||||||
QPushButton *cancelBtn;
|
QPushButton *cancelBtn;
|
||||||
|
|
||||||
QString title;
|
QString title;
|
||||||
QString defaultName;
|
|
||||||
QString info;
|
QString info;
|
||||||
|
QString defaultName;
|
||||||
QString defaultPath;
|
QString defaultPath;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -67,6 +67,7 @@ pre {
|
|||||||
background-color: #f8f8f8;
|
background-color: #f8f8f8;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
border: 1px solid #cccccc;
|
border: 1px solid #cccccc;
|
||||||
|
overflow: auto;
|
||||||
}
|
}
|
||||||
code {
|
code {
|
||||||
font-family: Consolas, Monaco, Andale Mono, monospace;
|
font-family: Consolas, Monaco, Andale Mono, monospace;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user