refacor media widget, apply clang format rule

This commit is contained in:
2026-02-07 14:14:50 +01:00
parent 64b3babd3d
commit d9ac353a0d
54 changed files with 642 additions and 878 deletions

View File

@@ -2,6 +2,7 @@
#include <memory>
#include <spdlog/spdlog.h>
#include "components/button/iconButton.hpp"
#include "glibmm/datetime.h"
@@ -86,7 +87,6 @@ void CopyNotification::createImageNotification(NotifyMessage notify) {
auto buttonBox = Gtk::make_managed<Gtk::Box>();
buttonBox->set_spacing(10);
auto saveToClipboardButton = Gtk::make_managed<IconButton>(Icon::CONTENT_COPY);
saveToClipboardButton->signal_clicked().connect([this]() {
copyToClipboard(this->copiedImage);
@@ -103,8 +103,8 @@ void CopyNotification::createImageNotification(NotifyMessage notify) {
// xdg-pic/screenshot // use env
auto xdgPicturesDir = Glib::get_user_special_dir(Glib::UserDirectory::PICTURES);
auto dateStamp = Glib::DateTime::create_now_local().format("%Y%m%d_%H%M%S");
auto filepath = xdgPicturesDir + "/screenshot" ;
auto filename = dateStamp + ".png";
auto filepath = xdgPicturesDir + "/screenshot";
auto filename = dateStamp + ".png";
saveImageToFile(this->copiedImage, filepath, filename);
spdlog::info("Saved image to {}", filepath.c_str());
@@ -119,7 +119,6 @@ void CopyNotification::createImageNotification(NotifyMessage notify) {
contentBox->append(*buttonBox);
this->mainBox.append(*contentBox);
}
void CopyNotification::createTextNotification(NotifyMessage notify) {