mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-27 10:41:58 +02:00
DRYer
This commit is contained in:
@@ -707,12 +707,10 @@ BOOL_SET(in_sequence_mode)
|
|||||||
|
|
||||||
static void
|
static void
|
||||||
init_screen_render_data(OSWindow *osw, const WindowGeometry *g, ScreenRenderData *d) {
|
init_screen_render_data(OSWindow *osw, const WindowGeometry *g, ScreenRenderData *d) {
|
||||||
d->dx = (2.f * osw->fonts_data->cell_width) / (float)osw->viewport_width;
|
d->dx = gl_size(osw->fonts_data->cell_width, osw->viewport_width);
|
||||||
d->dy = (2.f * osw->fonts_data->cell_height) / (float)osw->viewport_height;
|
d->dy = gl_size(osw->fonts_data->cell_height, osw->viewport_height);
|
||||||
float xmargin = g->left / (float)osw->viewport_width, ymargin = g->top / (float)osw->viewport_height;
|
d->xstart = -1.f + gl_size(g->left, osw->viewport_width);
|
||||||
d->xstart = -1.f + 2.f * xmargin;
|
d->ystart = 1.f - gl_size(g->top, osw->viewport_height);
|
||||||
d->ystart = 1.f - 2.f * ymargin;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PYWRAP1(set_tab_bar_render_data) {
|
PYWRAP1(set_tab_bar_render_data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user