X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fgui%2FguiTable.cpp;h=c705e17fb0ed2a3755e9489583236bbc1adc3b0b;hb=a978278bfba743ece5ec149aa366067aa47b61ff;hp=b1a027e9b76495513b737f6cb7e874e7b4b4885c;hpb=3b112889892f6652d4e80d97e45131f179b1fbe4;p=dragonfireclient.git diff --git a/src/gui/guiTable.cpp b/src/gui/guiTable.cpp index b1a027e9b..c705e17fb 100644 --- a/src/gui/guiTable.cpp +++ b/src/gui/guiTable.cpp @@ -25,7 +25,6 @@ with this program; if not, write to the Free Software Foundation, Inc., #include #include #include -#include #include "client/renderingengine.h" #include "debug.h" #include "log.h" @@ -36,7 +35,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "util/string.h" // for parseColorString() #include "settings.h" // for settings #include "porting.h" // for dpi -#include "guiscalingfilter.h" +#include "client/guiscalingfilter.h" /* GUITable @@ -62,12 +61,12 @@ GUITable::GUITable(gui::IGUIEnvironment *env, } const s32 s = skin->getSize(gui::EGDS_SCROLLBAR_SIZE); - m_scrollbar = Environment->addScrollBar(false, + m_scrollbar = new GUIScrollBar(Environment, this, -1, core::rect(RelativeRect.getWidth() - s, 0, RelativeRect.getWidth(), RelativeRect.getHeight()), - this, -1); + false, true); m_scrollbar->setSubElement(true); m_scrollbar->setTabStop(false); m_scrollbar->setAlignment(gui::EGUIA_LOWERRIGHT, gui::EGUIA_LOWERRIGHT, @@ -99,7 +98,8 @@ GUITable::~GUITable() if (m_font) m_font->drop(); - m_scrollbar->remove(); + if (m_scrollbar) + m_scrollbar->drop(); } GUITable::Option GUITable::splitOption(const std::string &str) @@ -1075,6 +1075,7 @@ void GUITable::updateScrollBar() m_scrollbar->setMax(scrollmax); m_scrollbar->setSmallStep(m_rowheight); m_scrollbar->setLargeStep(2 * m_rowheight); + m_scrollbar->setPageSize(totalheight); } void GUITable::sendTableEvent(s32 column, bool doubleclick)