summaryrefslogtreecommitdiff
path: root/src/gui
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-04-30 16:07:15 +0300
committerAndrei Karas <akaras@inbox.ru>2015-04-30 16:07:15 +0300
commita5d4a43d93f1acc5b0fabe98e45bffb1bcbe34b3 (patch)
treeae132e8a16b45775f3dcaa68326d8ec3646dcfe7 /src/gui
parent2dbc66a47f39e8212898af88832afa0522e893b5 (diff)
downloadmanaverse-a5d4a43d93f1acc5b0fabe98e45bffb1bcbe34b3.tar.gz
manaverse-a5d4a43d93f1acc5b0fabe98e45bffb1bcbe34b3.tar.bz2
manaverse-a5d4a43d93f1acc5b0fabe98e45bffb1bcbe34b3.tar.xz
manaverse-a5d4a43d93f1acc5b0fabe98e45bffb1bcbe34b3.zip
Use scrollarea for mail list.
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/windows/mailwindow.cpp7
-rw-r--r--src/gui/windows/mailwindow.h2
2 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/windows/mailwindow.cpp b/src/gui/windows/mailwindow.cpp
index aec30ce89..b23984c4c 100644
--- a/src/gui/windows/mailwindow.cpp
+++ b/src/gui/windows/mailwindow.cpp
@@ -36,6 +36,7 @@
#include "gui/widgets/label.h"
#include "gui/widgets/layout.h"
#include "gui/widgets/layouttype.h"
+#include "gui/widgets/scrollarea.h"
#include "utils/delete2.h"
#include "utils/dtor.h"
@@ -54,6 +55,8 @@ MailWindow::MailWindow() :
mMessagesMap(),
mMailModel(new ExtendedNamesModel),
mListBox(new ExtendedListBox(this, mMailModel, "extendedlistbox.xml")),
+ mListScrollArea(new ScrollArea(this, mListBox,
+ getOptionBool("showlistbackground"), "mail_listbackground.xml")),
// TRANSLATORS: mail window button
mRefreshButton(new Button(this, _("Refresh"), "refresh", this)),
// TRANSLATORS: mail window button
@@ -81,10 +84,12 @@ MailWindow::MailWindow() :
setMinHeight(179);
center();
+ mListScrollArea->setHorizontalScrollPolicy(ScrollArea::SHOW_NEVER);
+
ContainerPlacer placer;
placer = getPlacer(0, 0);
- placer(0, 0, mListBox, 4, 4).setPadding(3);
+ placer(0, 0, mListScrollArea, 4, 5).setPadding(3);
placer(4, 0, mRefreshButton);
placer(4, 1, mOpenButton);
placer(4, 2, mNewButton);
diff --git a/src/gui/windows/mailwindow.h b/src/gui/windows/mailwindow.h
index fc5fab397..e1562f074 100644
--- a/src/gui/windows/mailwindow.h
+++ b/src/gui/windows/mailwindow.h
@@ -30,6 +30,7 @@
class Button;
class ExtendedListBox;
class ExtendedNamesModel;
+class ScrollArea;
struct MailMessage;
@@ -67,6 +68,7 @@ class MailWindow final : public Window,
std::map<int, MailMessage*> mMessagesMap;
ExtendedNamesModel *mMailModel;
ExtendedListBox *mListBox;
+ ScrollArea *mListScrollArea;
Button *mRefreshButton;
Button *mNewButton;
Button *mDeleteButton;