summaryrefslogtreecommitdiff
path: root/src/gui/skill.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-01-20 16:46:17 -0700
committerIra Rice <irarice@gmail.com>2009-01-20 16:46:17 -0700
commit1b3ac1ad7a745ed7b7aac1f1dd7514616db8a998 (patch)
treed04d002a96fb2febbfd8a42b66aab38f04ee6b16 /src/gui/skill.cpp
parentc75f6978e780a4cbe7e4103b7a3187c2ddf75c33 (diff)
downloadmana-client-1b3ac1ad7a745ed7b7aac1f1dd7514616db8a998.tar.gz
mana-client-1b3ac1ad7a745ed7b7aac1f1dd7514616db8a998.tar.bz2
mana-client-1b3ac1ad7a745ed7b7aac1f1dd7514616db8a998.tar.xz
mana-client-1b3ac1ad7a745ed7b7aac1f1dd7514616db8a998.zip
Reflowed skill dialog, as well as started to work on revising the table
model (none of the changes yet make visible improvements yet, unfortunately). Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/skill.cpp')
-rw-r--r--src/gui/skill.cpp23
1 files changed, 12 insertions, 11 deletions
diff --git a/src/gui/skill.cpp b/src/gui/skill.cpp
index 44f77253..35a41659 100644
--- a/src/gui/skill.cpp
+++ b/src/gui/skill.cpp
@@ -28,6 +28,8 @@
#include "skill.h"
#include "windowcontainer.h"
+#include "widgets/layout.h"
+
#include "../localplayer.h"
#include "../log.h"
@@ -51,7 +53,7 @@ class SkillGuiTableModel : public StaticTableModel
{
public:
SkillGuiTableModel(SkillDialog *dialog) :
- StaticTableModel(0, 3)
+ StaticTableModel(0, 3, 0xbdb5aa)
{
mEntriesNr = 0;
mDialog = dialog;
@@ -136,16 +138,15 @@ SkillDialog::SkillDialog():
mTable.setActionEventId("skill");
skillScrollArea->setHorizontalScrollPolicy(gcn::ScrollArea::SHOW_NEVER);
- skillScrollArea->setDimension(gcn::Rectangle(5, 5, 230, 180));
- mPointsLabel->setDimension(gcn::Rectangle(8, 190, 200, 16));
- mIncButton->setPosition(skillScrollArea->getX(), 210);
- mUseButton->setPosition(mIncButton->getX() + mIncButton->getWidth() + 5,
- 210);
-
- add(skillScrollArea);
- add(mPointsLabel);
- add(mIncButton);
- add(mUseButton);
+ skillScrollArea->setOpaque(false);
+
+ place(0, 0, skillScrollArea, 5).setPadding(3);
+ place(0, 1, mPointsLabel, 2);
+ place(3, 2, mIncButton);
+ place(4, 2, mUseButton);
+
+ Layout &layout = getLayout();
+ layout.setRowHeight(0, Layout::AUTO_SET);
// mSkillListBox->addActionListener(this);
mTable.addActionListener(this);