mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-11 13:50:48 -05:00
Allow dpi to be set
This commit is contained in:
parent
2ae7939523
commit
cb9dd606aa
4 changed files with 9 additions and 3 deletions
|
@ -145,4 +145,5 @@ Settings config = {
|
|||
.markup_rows = FALSE,
|
||||
.fullscreen = FALSE,
|
||||
.fake_transparency = FALSE,
|
||||
.dpi = -1,
|
||||
};
|
||||
|
|
|
@ -248,6 +248,8 @@ typedef struct _Settings
|
|||
unsigned int fullscreen;
|
||||
/** bg image */
|
||||
unsigned int fake_transparency;
|
||||
/** dpi */
|
||||
int dpi;
|
||||
} Settings;
|
||||
|
||||
/** Global Settings structure. */
|
||||
|
|
|
@ -647,9 +647,11 @@ void textbox_setup ( Display *display )
|
|||
parse_color ( display, config.menu_hlfg_active, &( colors[ACTIVE].hlfg ) );
|
||||
parse_color ( display, config.menu_hlbg_active, &( colors[ACTIVE].hlbg ) );
|
||||
}
|
||||
PangoFontMap *font_map = pango_cairo_font_map_new ();
|
||||
PangoFontMap *font_map = pango_cairo_font_map_get_default ();
|
||||
if(config.dpi > 0 ) {
|
||||
pango_cairo_font_map_set_resolution((PangoCairoFontMap*)font_map, (double)config.dpi);
|
||||
}
|
||||
p_context = pango_font_map_create_context ( font_map );
|
||||
g_object_unref ( font_map );
|
||||
}
|
||||
|
||||
void textbox_cleanup ( void )
|
||||
|
|
|
@ -134,7 +134,8 @@ static XrmOption xrmOptions[] = {
|
|||
{ xrm_Boolean, "hide-scrollbar", { .num = &config.hide_scrollbar }, NULL, "Hide scroll-bar" },
|
||||
{ xrm_Boolean, "markup-rows", { .num = &config.markup_rows }, NULL, "Show markup" },
|
||||
{ xrm_Boolean, "fullscreen", { .num = &config.fullscreen }, NULL, "Fullscreen" },
|
||||
{ xrm_Boolean, "fake-transparency", { .num = &config.fake_transparency }, NULL, "Fake transparency" }
|
||||
{ xrm_Boolean, "fake-transparency", { .num = &config.fake_transparency }, NULL, "Fake transparency" },
|
||||
{ xrm_SNumber, "dpi", { .snum = &config.dpi }, NULL, "DPI" }
|
||||
};
|
||||
|
||||
// Dynamic options.
|
||||
|
|
Loading…
Reference in a new issue