mirror of
https://github.com/obsqrbtz/clrsync.git
synced 2026-04-09 04:29:04 +03:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 56a499502f | |||
| 2b1c6d59c4 |
@@ -1,6 +1,6 @@
|
||||
# Maintainer: Daniel Dada <dan@binarygoose.dev>
|
||||
pkgname=clrsync
|
||||
pkgver=1.0.2
|
||||
pkgver=1.0.5
|
||||
pkgrel=1
|
||||
pkgdesc="Color scheme manager"
|
||||
arch=('x86_64')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
cmake_minimum_required(VERSION 3.25)
|
||||
project(clrsync VERSION 1.0.2 LANGUAGES CXX)
|
||||
project(clrsync VERSION 1.0.5 LANGUAGES CXX)
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
namespace clrsync::core
|
||||
{
|
||||
|
||||
const std::string GIT_SEMVER = "1.0.2+git.g41939f4";
|
||||
const std::string GIT_SEMVER = "1.0.4+git.g2b1c6d5";
|
||||
|
||||
const std::string version_string();
|
||||
} // namespace clrsync::core
|
||||
|
||||
@@ -16,6 +16,11 @@ glfw_opengl_backend::~glfw_opengl_backend()
|
||||
glfw_opengl_backend::shutdown();
|
||||
}
|
||||
|
||||
void glfw_opengl_backend::focus_callback(GLFWwindow*, int focused)
|
||||
{
|
||||
glfwSwapInterval(focused ? 1 : 0);
|
||||
}
|
||||
|
||||
bool glfw_opengl_backend::initialize(const window_config &config)
|
||||
{
|
||||
glfwSetErrorCallback([](int error, const char* description) {
|
||||
@@ -48,6 +53,7 @@ bool glfw_opengl_backend::initialize(const window_config &config)
|
||||
|
||||
glfwMakeContextCurrent(m_window);
|
||||
glfwSwapInterval(1);
|
||||
glfwSetWindowFocusCallback(m_window, focus_callback);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -32,6 +32,8 @@ namespace clrsync::gui::backend{
|
||||
void imgui_render_draw_data(void* draw_data) override;
|
||||
|
||||
private:
|
||||
static void focus_callback(GLFWwindow* window, int focused);
|
||||
|
||||
GLFWwindow* m_window = nullptr;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "gui/platform/file_browser.hpp"
|
||||
#include <gtk/gtk.h>
|
||||
#include <filesystem>
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
namespace file_dialogs
|
||||
{
|
||||
@@ -38,7 +39,16 @@ std::string open_file_dialog(const std::string &title, const std::string &initia
|
||||
}
|
||||
|
||||
std::string result;
|
||||
if (gtk_native_dialog_run(GTK_NATIVE_DIALOG(native)) == GTK_RESPONSE_ACCEPT)
|
||||
|
||||
gint response = gtk_native_dialog_run(GTK_NATIVE_DIALOG(native));
|
||||
|
||||
while (gtk_events_pending())
|
||||
{
|
||||
gtk_main_iteration();
|
||||
glfwPollEvents();
|
||||
}
|
||||
|
||||
if (response == GTK_RESPONSE_ACCEPT)
|
||||
{
|
||||
char *filename = gtk_file_chooser_get_filename(chooser);
|
||||
if (filename)
|
||||
@@ -79,7 +89,16 @@ std::string save_file_dialog(const std::string &title, const std::string &initia
|
||||
}
|
||||
|
||||
std::string result;
|
||||
if (gtk_native_dialog_run(GTK_NATIVE_DIALOG(native)) == GTK_RESPONSE_ACCEPT)
|
||||
|
||||
gint response = gtk_native_dialog_run(GTK_NATIVE_DIALOG(native));
|
||||
|
||||
while (gtk_events_pending())
|
||||
{
|
||||
gtk_main_iteration();
|
||||
glfwPollEvents();
|
||||
}
|
||||
|
||||
if (response == GTK_RESPONSE_ACCEPT)
|
||||
{
|
||||
char *filename = gtk_file_chooser_get_filename(chooser);
|
||||
if (filename)
|
||||
@@ -113,7 +132,16 @@ std::string select_folder_dialog(const std::string &title, const std::string &in
|
||||
}
|
||||
|
||||
std::string result;
|
||||
if (gtk_native_dialog_run(GTK_NATIVE_DIALOG(native)) == GTK_RESPONSE_ACCEPT)
|
||||
|
||||
gint response = gtk_native_dialog_run(GTK_NATIVE_DIALOG(native));
|
||||
|
||||
while (gtk_events_pending())
|
||||
{
|
||||
gtk_main_iteration();
|
||||
glfwPollEvents();
|
||||
}
|
||||
|
||||
if (response == GTK_RESPONSE_ACCEPT)
|
||||
{
|
||||
char *filename = gtk_file_chooser_get_filename(chooser);
|
||||
if (filename)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <algorithm>
|
||||
#include <fontconfig/fontconfig.h>
|
||||
#include <imgui.h>
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
std::string font_loader::find_font_linux(const char *font_name)
|
||||
{
|
||||
@@ -64,7 +65,6 @@ void font_loader::pop_font()
|
||||
std::vector<std::string> font_loader::get_system_fonts()
|
||||
{
|
||||
std::vector<std::string> fonts;
|
||||
|
||||
FcInit();
|
||||
FcPattern *pattern = FcPatternCreate();
|
||||
FcObjectSet *os = FcObjectSetBuild(FC_FAMILY, nullptr);
|
||||
|
||||
Reference in New Issue
Block a user