mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
stylesheet
Signed-off-by: Le Tan <tamlokveer@gmail.com>
This commit is contained in:
parent
3ecae78262
commit
8f866f34ff
@ -100,10 +100,6 @@ QListWidget::item {
|
|||||||
padding-bottom: 3px;
|
padding-bottom: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
QListWidget#FileList {
|
|
||||||
border-top: 2px solid @base-color;
|
|
||||||
}
|
|
||||||
|
|
||||||
QSplitter {
|
QSplitter {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
@ -113,13 +109,17 @@ QSplitter::handle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
QSplitter::handle:vertical {
|
QSplitter::handle:vertical {
|
||||||
height: 2px;
|
height: 1px;
|
||||||
|
}
|
||||||
|
|
||||||
|
QSplitter#MainSplitter {
|
||||||
|
border-top: 2px solid @base-color;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* QMainWindow */
|
/* QMainWindow */
|
||||||
QMainWindow::separator {
|
QMainWindow::separator {
|
||||||
background-color: @base-color;
|
background-color: @base-color;
|
||||||
height: 2px;
|
height: 1px;
|
||||||
}
|
}
|
||||||
/* End QMainWindow */
|
/* End QMainWindow */
|
||||||
|
|
||||||
@ -137,3 +137,6 @@ QToolBox::tab {
|
|||||||
background-color: @Indigo2;
|
background-color: @Indigo2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QWidget[NotebookPanel="true"] {
|
||||||
|
padding-left: 3px;
|
||||||
|
}
|
||||||
|
@ -45,6 +45,7 @@ void VMainWindow::setupUI()
|
|||||||
|
|
||||||
// Main Splitter
|
// Main Splitter
|
||||||
mainSplitter = new QSplitter();
|
mainSplitter = new QSplitter();
|
||||||
|
mainSplitter->setObjectName("MainSplitter");
|
||||||
mainSplitter->addWidget(directoryPanel);
|
mainSplitter->addWidget(directoryPanel);
|
||||||
mainSplitter->addWidget(fileList);
|
mainSplitter->addWidget(fileList);
|
||||||
mainSplitter->addWidget(editArea);
|
mainSplitter->addWidget(editArea);
|
||||||
@ -79,23 +80,28 @@ QWidget *VMainWindow::setupDirectoryPanel()
|
|||||||
{
|
{
|
||||||
notebookLabel = new QLabel(tr("Notebook"));
|
notebookLabel = new QLabel(tr("Notebook"));
|
||||||
notebookLabel->setProperty("TitleLabel", true);
|
notebookLabel->setProperty("TitleLabel", true);
|
||||||
|
notebookLabel->setProperty("NotebookPanel", true);
|
||||||
directoryLabel = new QLabel(tr("Directory"));
|
directoryLabel = new QLabel(tr("Directory"));
|
||||||
directoryLabel->setProperty("TitleLabel", true);
|
directoryLabel->setProperty("TitleLabel", true);
|
||||||
|
directoryLabel->setProperty("NotebookPanel", true);
|
||||||
|
|
||||||
notebookSelector = new VNotebookSelector(vnote);
|
notebookSelector = new VNotebookSelector(vnote);
|
||||||
notebookSelector->setObjectName("NotebookSelector");
|
notebookSelector->setObjectName("NotebookSelector");
|
||||||
|
notebookSelector->setProperty("NotebookPanel", true);
|
||||||
notebookSelector->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLengthWithIcon);
|
notebookSelector->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLengthWithIcon);
|
||||||
|
|
||||||
directoryTree = new VDirectoryTree(vnote);
|
directoryTree = new VDirectoryTree(vnote);
|
||||||
|
directoryTree->setProperty("NotebookPanel", true);
|
||||||
|
|
||||||
QVBoxLayout *nbLayout = new QVBoxLayout;
|
QVBoxLayout *nbLayout = new QVBoxLayout;
|
||||||
nbLayout->addWidget(notebookLabel);
|
nbLayout->addWidget(notebookLabel);
|
||||||
nbLayout->addWidget(notebookSelector);
|
nbLayout->addWidget(notebookSelector);
|
||||||
nbLayout->addWidget(directoryLabel);
|
nbLayout->addWidget(directoryLabel);
|
||||||
nbLayout->addWidget(directoryTree);
|
nbLayout->addWidget(directoryTree);
|
||||||
nbLayout->setContentsMargins(2, 0, 0, 0);
|
nbLayout->setContentsMargins(0, 0, 0, 0);
|
||||||
nbLayout->setSpacing(0);
|
nbLayout->setSpacing(0);
|
||||||
QWidget *nbContainer = new QWidget();
|
QWidget *nbContainer = new QWidget();
|
||||||
|
nbContainer->setObjectName("NotebookPanel");
|
||||||
nbContainer->setLayout(nbLayout);
|
nbContainer->setLayout(nbLayout);
|
||||||
nbContainer->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Expanding);
|
nbContainer->setSizePolicy(QSizePolicy::Maximum, QSizePolicy::Expanding);
|
||||||
|
|
||||||
@ -241,15 +247,18 @@ void VMainWindow::initActions()
|
|||||||
void VMainWindow::initToolBar()
|
void VMainWindow::initToolBar()
|
||||||
{
|
{
|
||||||
QToolBar *fileToolBar = addToolBar(tr("Note"));
|
QToolBar *fileToolBar = addToolBar(tr("Note"));
|
||||||
fileToolBar->setObjectName("note");
|
fileToolBar->setObjectName("NoteToolBar");
|
||||||
|
fileToolBar->setMovable(false);
|
||||||
fileToolBar->addAction(newRootDirAct);
|
fileToolBar->addAction(newRootDirAct);
|
||||||
fileToolBar->addAction(newNoteAct);
|
fileToolBar->addAction(newNoteAct);
|
||||||
fileToolBar->addAction(noteInfoAct);
|
fileToolBar->addAction(noteInfoAct);
|
||||||
fileToolBar->addAction(deleteNoteAct);
|
fileToolBar->addAction(deleteNoteAct);
|
||||||
|
fileToolBar->addSeparator();
|
||||||
fileToolBar->addAction(editNoteAct);
|
fileToolBar->addAction(editNoteAct);
|
||||||
fileToolBar->addAction(saveExitAct);
|
fileToolBar->addAction(saveExitAct);
|
||||||
fileToolBar->addAction(discardExitAct);
|
fileToolBar->addAction(discardExitAct);
|
||||||
fileToolBar->addAction(saveNoteAct);
|
fileToolBar->addAction(saveNoteAct);
|
||||||
|
fileToolBar->addSeparator();
|
||||||
|
|
||||||
newRootDirAct->setEnabled(false);
|
newRootDirAct->setEnabled(false);
|
||||||
newNoteAct->setEnabled(false);
|
newNoteAct->setEnabled(false);
|
||||||
@ -261,7 +270,8 @@ void VMainWindow::initToolBar()
|
|||||||
saveNoteAct->setVisible(false);
|
saveNoteAct->setVisible(false);
|
||||||
|
|
||||||
QToolBar *viewToolBar = addToolBar(tr("View"));
|
QToolBar *viewToolBar = addToolBar(tr("View"));
|
||||||
viewToolBar->setObjectName("view");
|
viewToolBar->setObjectName("ViewToolBar");
|
||||||
|
viewToolBar->setMovable(false);
|
||||||
viewToolBar->addAction(twoPanelViewAct);
|
viewToolBar->addAction(twoPanelViewAct);
|
||||||
viewToolBar->addAction(onePanelViewAct);
|
viewToolBar->addAction(onePanelViewAct);
|
||||||
viewToolBar->addAction(expandViewAct);
|
viewToolBar->addAction(expandViewAct);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user