mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-29 13:16:00 +01:00
Re-render all pages when calling cb_color_change
This commit is contained in:
parent
0474235483
commit
1028d90e6c
2 changed files with 6 additions and 4 deletions
6
config.c
6
config.c
|
@ -6,6 +6,7 @@
|
||||||
#include "callbacks.h"
|
#include "callbacks.h"
|
||||||
#include "shortcuts.h"
|
#include "shortcuts.h"
|
||||||
#include "zathura.h"
|
#include "zathura.h"
|
||||||
|
#include "render.h"
|
||||||
|
|
||||||
#include <girara/settings.h>
|
#include <girara/settings.h>
|
||||||
#include <girara/session.h>
|
#include <girara/session.h>
|
||||||
|
@ -16,7 +17,8 @@
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
|
|
||||||
static void
|
static void
|
||||||
cb_color_change(girara_session_t* session, const char* name, girara_setting_type_t UNUSED(type), void* value, void* UNUSED(data))
|
cb_color_change(girara_session_t* session, const char* name,
|
||||||
|
girara_setting_type_t UNUSED(type), void* value, void* UNUSED(data))
|
||||||
{
|
{
|
||||||
g_return_if_fail(value != NULL);
|
g_return_if_fail(value != NULL);
|
||||||
g_return_if_fail(session != NULL);
|
g_return_if_fail(session != NULL);
|
||||||
|
@ -35,7 +37,7 @@ cb_color_change(girara_session_t* session, const char* name, girara_setting_type
|
||||||
gdk_color_parse(string_value, &(zathura->ui.colors.recolor_light_color));
|
gdk_color_parse(string_value, &(zathura->ui.colors.recolor_light_color));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: cause a redraw here? */
|
render_all(zathura);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -339,8 +339,8 @@ sc_navigate(girara_session_t* session, girara_argument_t* argument,
|
||||||
g_return_val_if_fail(argument != NULL, false);
|
g_return_val_if_fail(argument != NULL, false);
|
||||||
g_return_val_if_fail(zathura->document != NULL, false);
|
g_return_val_if_fail(zathura->document != NULL, false);
|
||||||
|
|
||||||
unsigned int number_of_pages = zathura->document->number_of_pages;
|
int number_of_pages = zathura->document->number_of_pages;
|
||||||
unsigned int new_page = zathura->document->current_page_number;
|
int new_page = zathura->document->current_page_number;
|
||||||
|
|
||||||
bool scroll_wrap = false;
|
bool scroll_wrap = false;
|
||||||
girara_setting_get(session, "scroll-wrap", &scroll_wrap);
|
girara_setting_get(session, "scroll-wrap", &scroll_wrap);
|
||||||
|
|
Loading…
Reference in a new issue