mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
fixed tabs being in weird positions at the start
This commit is contained in:
parent
c54f2c31dd
commit
9f7a674472
3 changed files with 19 additions and 4 deletions
|
@ -503,8 +503,6 @@ Message::layout(int width, bool enableEmoteMargins)
|
|||
|
||||
std::vector<short> &charWidths = word.getCharacterWidthCache();
|
||||
|
||||
auto xD = charWidths.size();
|
||||
|
||||
if (charWidths.size() == 0) {
|
||||
for (int i = 0; i < text.length(); i++) {
|
||||
charWidths.push_back(metrics.charWidth(text, i));
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "ircmanager.h"
|
||||
#include "settings.h"
|
||||
|
||||
#include <QCompleter>
|
||||
#include <QPainter>
|
||||
#include <boost/signals2.hpp>
|
||||
|
||||
|
@ -50,7 +51,17 @@ ChatWidgetInput::ChatWidgetInput(ChatWidget *widget)
|
|||
this->setMessageLengthVisisble(
|
||||
Settings::getInstance().showMessageLength.get());
|
||||
|
||||
this->edit.keyPressed.connect([this](QKeyEvent *event) {
|
||||
QStringList list;
|
||||
list.append("asd");
|
||||
list.append("asdf");
|
||||
list.append("asdg");
|
||||
list.append("asdh");
|
||||
|
||||
QCompleter *completer = new QCompleter(list, &edit);
|
||||
|
||||
completer->setWidget(&edit);
|
||||
|
||||
this->edit.keyPressed.connect([this, completer](QKeyEvent *event) {
|
||||
if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return) {
|
||||
auto ptr = this->chatWidget->getChannel();
|
||||
Channel *c = ptr.get();
|
||||
|
@ -62,6 +73,11 @@ ChatWidgetInput::ChatWidgetInput(ChatWidget *widget)
|
|||
this->edit.setText(QString());
|
||||
}
|
||||
}
|
||||
// else {
|
||||
// completer->setCompletionPrefix("asdf");
|
||||
// completer->complete();
|
||||
// // completer->popup();
|
||||
// }
|
||||
});
|
||||
|
||||
/* XXX(pajlada): FIX THIS
|
||||
|
|
|
@ -65,7 +65,8 @@ NotebookTab::moveAnimated(QPoint pos, bool animated)
|
|||
|
||||
posAnimationDesired = pos;
|
||||
|
||||
if (!animated || posAnimated == false) {
|
||||
if ((this->window() != NULL && !this->window()->isVisible()) || !animated ||
|
||||
posAnimated == false) {
|
||||
move(pos);
|
||||
|
||||
posAnimated = true;
|
||||
|
|
Loading…
Reference in a new issue