row: Moved button sizing closer to row
This commit is contained in:
@ -34,7 +34,6 @@
|
||||
|
||||
#include "eek-renderer.h"
|
||||
#include "eek-keyboard.h"
|
||||
#include "eek-section.h"
|
||||
#include "src/symbol.h"
|
||||
|
||||
#include "eek-gtk-keyboard.h"
|
||||
|
||||
@ -30,7 +30,6 @@
|
||||
#include "config.h"
|
||||
#include <glib/gprintf.h>
|
||||
|
||||
#include "eek-section.h"
|
||||
#include "eek-enumtypes.h"
|
||||
#include "eekboard/key-emitter.h"
|
||||
#include "keymap.h"
|
||||
|
||||
@ -70,7 +70,7 @@ row_placer(gpointer item, gpointer user_data)
|
||||
squeek_row_set_bounds(row, row_bounds);
|
||||
|
||||
// Gather up all the keys in a row and adjust their bounds.
|
||||
eek_row_place_buttons(row, data->keyboard);
|
||||
squeek_row_place_buttons(row, data->keyboard);
|
||||
|
||||
row_bounds = squeek_row_get_bounds(row);
|
||||
row_bounds.y = data->current_offset;
|
||||
|
||||
@ -24,7 +24,6 @@
|
||||
#include <string.h>
|
||||
#include <gdk-pixbuf/gdk-pixbuf.h>
|
||||
|
||||
#include "eek-section.h"
|
||||
#include "src/symbol.h"
|
||||
|
||||
#include "eek-renderer.h"
|
||||
|
||||
@ -54,17 +54,3 @@ EekBounds eek_get_outline_size(LevelKeyboard *keyboard, uint32_t oref) {
|
||||
EekBounds bounds = {0, 0, 0, 0};
|
||||
return bounds;
|
||||
}
|
||||
|
||||
void
|
||||
eek_row_place_buttons(struct squeek_row *row, LevelKeyboard *keyboard)
|
||||
{
|
||||
EekBounds row_size = squeek_row_place_keys(row, keyboard);
|
||||
EekBounds row_bounds = squeek_row_get_bounds(row);
|
||||
// FIXME: do centering of each row based on keyboard dimensions,
|
||||
// one level up the iterators
|
||||
// now centering by comparing previous width to the new, calculated one
|
||||
row_bounds.x = (row_bounds.width - row_size.width) / 2;
|
||||
row_bounds.width = row_size.width;
|
||||
row_bounds.height = row_size.height;
|
||||
squeek_row_set_bounds(row, row_bounds);
|
||||
}
|
||||
|
||||
@ -31,6 +31,4 @@
|
||||
#include "eek-keyboard.h"
|
||||
#include "src/layout.h"
|
||||
|
||||
void
|
||||
eek_row_place_buttons(struct squeek_row *row, LevelKeyboard *keyboard);
|
||||
#endif /* EEK_SECTION_H */
|
||||
|
||||
@ -28,7 +28,6 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "eek-keyboard.h"
|
||||
#include "eek-section.h"
|
||||
#include "src/keyboard.h"
|
||||
#include "src/symbol.h"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user