mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
added slight offset when notebook has no button
This commit is contained in:
parent
3bf3490aa3
commit
a4656f3ab5
|
@ -1,4 +1,4 @@
|
||||||
#include "widgets/helper/notebooktab.hpp"
|
//#include "widgets/helper/notebooktab.hpp"
|
||||||
#include "common.hpp"
|
#include "common.hpp"
|
||||||
#include "debug/log.hpp"
|
#include "debug/log.hpp"
|
||||||
#include "singletons/settingsmanager.hpp"
|
#include "singletons/settingsmanager.hpp"
|
||||||
|
|
|
@ -174,16 +174,18 @@ void Notebook::previousTab()
|
||||||
|
|
||||||
void Notebook::performLayout(bool animated)
|
void Notebook::performLayout(bool animated)
|
||||||
{
|
{
|
||||||
|
singletons::SettingManager &settings = singletons::SettingManager::getInstance();
|
||||||
|
|
||||||
int x = 0, y = 0;
|
int x = 0, y = 0;
|
||||||
float scale = this->getDpiMultiplier();
|
float scale = this->getDpiMultiplier();
|
||||||
|
|
||||||
if (!showButtons || singletons::SettingManager::getInstance().hidePreferencesButton) {
|
if (!showButtons || settings.hidePreferencesButton) {
|
||||||
this->settingsButton.hide();
|
this->settingsButton.hide();
|
||||||
} else {
|
} else {
|
||||||
this->settingsButton.show();
|
this->settingsButton.show();
|
||||||
x += settingsButton.width();
|
x += settingsButton.width();
|
||||||
}
|
}
|
||||||
if (!showButtons || singletons::SettingManager::getInstance().hideUserButton) {
|
if (!showButtons || settings.hideUserButton) {
|
||||||
this->userButton.hide();
|
this->userButton.hide();
|
||||||
} else {
|
} else {
|
||||||
this->userButton.move(x, 0);
|
this->userButton.move(x, 0);
|
||||||
|
@ -191,6 +193,10 @@ void Notebook::performLayout(bool animated)
|
||||||
x += userButton.width();
|
x += userButton.width();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!showButtons || (settings.hideUserButton && settings.hidePreferencesButton)) {
|
||||||
|
x += (int)(scale * 2);
|
||||||
|
}
|
||||||
|
|
||||||
int tabHeight = static_cast<int>(24 * scale);
|
int tabHeight = static_cast<int>(24 * scale);
|
||||||
bool first = true;
|
bool first = true;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue