summaryrefslogtreecommitdiff
path: root/src/gui/recorder.cpp
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-03-10 11:50:27 -0600
committerIra Rice <irarice@gmail.com>2009-03-10 11:50:27 -0600
commit58ee835c3763e7bf088fa6c7e31dda1d687589cc (patch)
tree2eb06f7ee3fa05af68fb536284497a9967222ad9 /src/gui/recorder.cpp
parent5bbf8219bffbb587cf9a23561734c917bb23f42f (diff)
downloadmana-58ee835c3763e7bf088fa6c7e31dda1d687589cc.tar.gz
mana-58ee835c3763e7bf088fa6c7e31dda1d687589cc.tar.bz2
mana-58ee835c3763e7bf088fa6c7e31dda1d687589cc.tar.xz
mana-58ee835c3763e7bf088fa6c7e31dda1d687589cc.zip
Extended window layout to take relative positions, as well as offsets to
that position. This makes it so that when resolutions are changed, the default locations stay relative to the window's position, and not the 800x600 screen resolution. Signed-off-by: Ira Rice <irarice@gmail.com>
Diffstat (limited to 'src/gui/recorder.cpp')
-rw-r--r--src/gui/recorder.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/recorder.cpp b/src/gui/recorder.cpp
index ff8825ef..9320e020 100644
--- a/src/gui/recorder.cpp
+++ b/src/gui/recorder.cpp
@@ -40,9 +40,11 @@ Recorder::Recorder(ChatWindow *chat, const std::string &title,
mChat = chat;
Button *button = new Button(buttonTxt, "activate", this);
- setDefaultSize(0, windowContainer->getHeight() - 123 - button->getHeight() -
- offsetY, button->getWidth() + offsetX, button->getHeight() +
- offsetY);
+
+ // 123 is the default chat window height. If you change this in Chat, please
+ // change it here as well
+ setDefaultSize(button->getWidth() + offsetX, button->getHeight() +
+ offsetY, ImageRect::LOWER_LEFT, 0, 123);
place(0, 0, button);