|
|
@ -34,7 +34,8 @@ EmojiPanel::EmojiPanel(QWidget *parent) |
|
|
|
, animationDuration_{ 100 } |
|
|
|
, animationDuration_{ 100 } |
|
|
|
, categoryIconSize_{ 20 } |
|
|
|
, categoryIconSize_{ 20 } |
|
|
|
{ |
|
|
|
{ |
|
|
|
setStyleSheet("QWidget {background: #f8fbfe; color: #e8e8e8; border: none;}" |
|
|
|
setStyleSheet( |
|
|
|
|
|
|
|
"QWidget {background: #f8fbfe; color: #e8e8e8; border: none;}" |
|
|
|
"QScrollBar:vertical { background-color: #f8fbfe; width: 8px; margin: 0px 2px 0 2px; }" |
|
|
|
"QScrollBar:vertical { background-color: #f8fbfe; width: 8px; margin: 0px 2px 0 2px; }" |
|
|
|
"QScrollBar::handle:vertical { background-color: #d6dde3; min-height: 20px; }" |
|
|
|
"QScrollBar::handle:vertical { background-color: #d6dde3; min-height: 20px; }" |
|
|
|
"QScrollBar::add-line:vertical { border: none; background: none; }" |
|
|
|
"QScrollBar::add-line:vertical { border: none; background: none; }" |
|
|
@ -120,19 +121,23 @@ EmojiPanel::EmojiPanel(QWidget *parent) |
|
|
|
scrollLayout->setMargin(0); |
|
|
|
scrollLayout->setMargin(0); |
|
|
|
scrollArea_->setWidget(scrollWidget); |
|
|
|
scrollArea_->setWidget(scrollWidget); |
|
|
|
|
|
|
|
|
|
|
|
auto peopleEmoji = new EmojiCategory(tr("Smileys & People"), emoji_provider_.people, scrollWidget); |
|
|
|
auto peopleEmoji = |
|
|
|
|
|
|
|
new EmojiCategory(tr("Smileys & People"), emoji_provider_.people, scrollWidget); |
|
|
|
scrollLayout->addWidget(peopleEmoji); |
|
|
|
scrollLayout->addWidget(peopleEmoji); |
|
|
|
|
|
|
|
|
|
|
|
auto natureEmoji = new EmojiCategory(tr("Animals & Nature"), emoji_provider_.nature, scrollWidget); |
|
|
|
auto natureEmoji = |
|
|
|
|
|
|
|
new EmojiCategory(tr("Animals & Nature"), emoji_provider_.nature, scrollWidget); |
|
|
|
scrollLayout->addWidget(natureEmoji); |
|
|
|
scrollLayout->addWidget(natureEmoji); |
|
|
|
|
|
|
|
|
|
|
|
auto foodEmoji = new EmojiCategory(tr("Food & Drink"), emoji_provider_.food, scrollWidget); |
|
|
|
auto foodEmoji = new EmojiCategory(tr("Food & Drink"), emoji_provider_.food, scrollWidget); |
|
|
|
scrollLayout->addWidget(foodEmoji); |
|
|
|
scrollLayout->addWidget(foodEmoji); |
|
|
|
|
|
|
|
|
|
|
|
auto activityEmoji = new EmojiCategory(tr("Activity"), emoji_provider_.activity, scrollWidget); |
|
|
|
auto activityEmoji = |
|
|
|
|
|
|
|
new EmojiCategory(tr("Activity"), emoji_provider_.activity, scrollWidget); |
|
|
|
scrollLayout->addWidget(activityEmoji); |
|
|
|
scrollLayout->addWidget(activityEmoji); |
|
|
|
|
|
|
|
|
|
|
|
auto travelEmoji = new EmojiCategory(tr("Travel & Places"), emoji_provider_.travel, scrollWidget); |
|
|
|
auto travelEmoji = |
|
|
|
|
|
|
|
new EmojiCategory(tr("Travel & Places"), emoji_provider_.travel, scrollWidget); |
|
|
|
scrollLayout->addWidget(travelEmoji); |
|
|
|
scrollLayout->addWidget(travelEmoji); |
|
|
|
|
|
|
|
|
|
|
|
auto objectsEmoji = new EmojiCategory(tr("Objects"), emoji_provider_.objects, scrollWidget); |
|
|
|
auto objectsEmoji = new EmojiCategory(tr("Objects"), emoji_provider_.objects, scrollWidget); |
|
|
@ -159,7 +164,9 @@ EmojiPanel::EmojiPanel(QWidget *parent) |
|
|
|
animation_->setEndValue(0); |
|
|
|
animation_->setEndValue(0); |
|
|
|
|
|
|
|
|
|
|
|
connect(peopleEmoji, &EmojiCategory::emojiSelected, this, &EmojiPanel::emojiSelected); |
|
|
|
connect(peopleEmoji, &EmojiCategory::emojiSelected, this, &EmojiPanel::emojiSelected); |
|
|
|
connect(peopleCategory, &QPushButton::clicked, [this, peopleEmoji]() { this->showEmojiCategory(peopleEmoji); }); |
|
|
|
connect(peopleCategory, &QPushButton::clicked, [this, peopleEmoji]() { |
|
|
|
|
|
|
|
this->showEmojiCategory(peopleEmoji); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
connect(natureEmoji, &EmojiCategory::emojiSelected, this, &EmojiPanel::emojiSelected); |
|
|
|
connect(natureEmoji, &EmojiCategory::emojiSelected, this, &EmojiPanel::emojiSelected); |
|
|
|
connect(natureCategory_, &QPushButton::clicked, [this, natureEmoji]() { |
|
|
|
connect(natureCategory_, &QPushButton::clicked, [this, natureEmoji]() { |
|
|
@ -167,7 +174,9 @@ EmojiPanel::EmojiPanel(QWidget *parent) |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
connect(foodEmoji, &EmojiCategory::emojiSelected, this, &EmojiPanel::emojiSelected); |
|
|
|
connect(foodEmoji, &EmojiCategory::emojiSelected, this, &EmojiPanel::emojiSelected); |
|
|
|
connect(foodCategory_, &QPushButton::clicked, [this, foodEmoji]() { this->showEmojiCategory(foodEmoji); }); |
|
|
|
connect(foodCategory_, &QPushButton::clicked, [this, foodEmoji]() { |
|
|
|
|
|
|
|
this->showEmojiCategory(foodEmoji); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
connect(activityEmoji, &EmojiCategory::emojiSelected, this, &EmojiPanel::emojiSelected); |
|
|
|
connect(activityEmoji, &EmojiCategory::emojiSelected, this, &EmojiPanel::emojiSelected); |
|
|
|
connect(activityCategory, &QPushButton::clicked, [this, activityEmoji]() { |
|
|
|
connect(activityCategory, &QPushButton::clicked, [this, activityEmoji]() { |
|
|
@ -175,7 +184,9 @@ EmojiPanel::EmojiPanel(QWidget *parent) |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
connect(travelEmoji, &EmojiCategory::emojiSelected, this, &EmojiPanel::emojiSelected); |
|
|
|
connect(travelEmoji, &EmojiCategory::emojiSelected, this, &EmojiPanel::emojiSelected); |
|
|
|
connect(travelCategory, &QPushButton::clicked, [this, travelEmoji]() { this->showEmojiCategory(travelEmoji); }); |
|
|
|
connect(travelCategory, &QPushButton::clicked, [this, travelEmoji]() { |
|
|
|
|
|
|
|
this->showEmojiCategory(travelEmoji); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
connect(objectsEmoji, &EmojiCategory::emojiSelected, this, &EmojiPanel::emojiSelected); |
|
|
|
connect(objectsEmoji, &EmojiCategory::emojiSelected, this, &EmojiPanel::emojiSelected); |
|
|
|
connect(objectsCategory, &QPushButton::clicked, [this, objectsEmoji]() { |
|
|
|
connect(objectsCategory, &QPushButton::clicked, [this, objectsEmoji]() { |
|
|
@ -188,7 +199,9 @@ EmojiPanel::EmojiPanel(QWidget *parent) |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
connect(flagsEmoji, &EmojiCategory::emojiSelected, this, &EmojiPanel::emojiSelected); |
|
|
|
connect(flagsEmoji, &EmojiCategory::emojiSelected, this, &EmojiPanel::emojiSelected); |
|
|
|
connect(flagsCategory, &QPushButton::clicked, [this, flagsEmoji]() { this->showEmojiCategory(flagsEmoji); }); |
|
|
|
connect(flagsCategory, &QPushButton::clicked, [this, flagsEmoji]() { |
|
|
|
|
|
|
|
this->showEmojiCategory(flagsEmoji); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
connect(animation_, &QAbstractAnimation::finished, [this]() { |
|
|
|
connect(animation_, &QAbstractAnimation::finished, [this]() { |
|
|
|
if (animation_->direction() == QAbstractAnimation::Forward) |
|
|
|
if (animation_->direction() == QAbstractAnimation::Forward) |
|
|
|