mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-21 16:05:02 +02:00
More stylistic fixes
This commit is contained in:
@@ -874,9 +874,6 @@ semi-transparent, "1" is interpreted as the image's current transparency.'''))
|
|||||||
o('background_image_scale', 1.0, option_type=positive_float, long_text=_('''
|
o('background_image_scale', 1.0, option_type=positive_float, long_text=_('''
|
||||||
Only has an effect if :opt:`background_image_layout` is tiling, should be positive.'''))
|
Only has an effect if :opt:`background_image_layout` is tiling, should be positive.'''))
|
||||||
|
|
||||||
o('background_image_scale', 1.0, option_type=positive_float, long_text=_('''
|
|
||||||
Only has an effect if :opt:`background_image_layout` is tiling, should be positive.'''))
|
|
||||||
|
|
||||||
o('dynamic_background_opacity', False, long_text=_('''
|
o('dynamic_background_opacity', False, long_text=_('''
|
||||||
Allow changing of the :opt:`background_opacity` dynamically, using either keyboard
|
Allow changing of the :opt:`background_opacity` dynamically, using either keyboard
|
||||||
shortcuts (:sc:`increase_background_opacity` and :sc:`decrease_background_opacity`)
|
shortcuts (:sc:`increase_background_opacity` and :sc:`decrease_background_opacity`)
|
||||||
|
|||||||
@@ -263,8 +263,8 @@ bool png_path_to_bitmap(uint8_t** data, unsigned int* width, unsigned int* heigh
|
|||||||
*data = calloc(filesize, sizeof(char));
|
*data = calloc(filesize, sizeof(char));
|
||||||
fseek(fp, 0L, SEEK_SET); // rewind() deprecated on some platforms
|
fseek(fp, 0L, SEEK_SET); // rewind() deprecated on some platforms
|
||||||
size_t r = fread(*data, sizeof(char), filesize, fp);
|
size_t r = fread(*data, sizeof(char), filesize, fp);
|
||||||
if (r != filesize) return false;
|
|
||||||
fclose(fp);
|
fclose(fp);
|
||||||
|
if (r != filesize) return false;
|
||||||
png_read_data d;
|
png_read_data d;
|
||||||
memset(&d, 0, sizeof(png_read_data));
|
memset(&d, 0, sizeof(png_read_data));
|
||||||
inflate_png_inner(&d, *data, filesize);
|
inflate_png_inner(&d, *data, filesize);
|
||||||
|
|||||||
@@ -670,7 +670,7 @@ draw_borders(ssize_t vao_idx, unsigned int num_border_rects, BorderRect *rect_bu
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (num_border_rects) {
|
if (num_border_rects) {
|
||||||
bind_vertex_array(vao_idx);
|
bind_vertex_array(vao_idx);
|
||||||
bind_program(BORDERS_PROGRAM);
|
bind_program(BORDERS_PROGRAM);
|
||||||
if (rect_data_is_dirty) {
|
if (rect_data_is_dirty) {
|
||||||
size_t sz = sizeof(GLuint) * 5 * num_border_rects;
|
size_t sz = sizeof(GLuint) * 5 * num_border_rects;
|
||||||
@@ -688,7 +688,7 @@ draw_borders(ssize_t vao_idx, unsigned int num_border_rects, BorderRect *rect_bu
|
|||||||
glUniform3f(border_uniform_locations[BORDER_default_bg], CV3(default_bg));
|
glUniform3f(border_uniform_locations[BORDER_default_bg], CV3(default_bg));
|
||||||
#undef CV3
|
#undef CV3
|
||||||
glDrawArraysInstanced(GL_TRIANGLE_FAN, 0, 4, num_border_rects);
|
glDrawArraysInstanced(GL_TRIANGLE_FAN, 0, 4, num_border_rects);
|
||||||
unbind_vertex_array();
|
unbind_vertex_array();
|
||||||
unbind_program();
|
unbind_program();
|
||||||
}
|
}
|
||||||
glDisable(GL_BLEND);
|
glDisable(GL_BLEND);
|
||||||
|
|||||||
Reference in New Issue
Block a user