Scale up servers table default column widths with DPI

This commit is contained in:
UnknownShadow200 2019-08-04 09:32:53 +10:00
parent dd7b1c1bca
commit 3584522e8f
2 changed files with 10 additions and 5 deletions

View File

@ -1090,6 +1090,7 @@ static struct LWidgetVTABLE ltable_VTABLE = {
LTable_MouseWheel, /* Wheel */ LTable_MouseWheel, /* Wheel */
}; };
void LTable_Init(struct LTable* w, FontDesc* rowFont) { void LTable_Init(struct LTable* w, FontDesc* rowFont) {
int i;
w->VTABLE = &ltable_VTABLE; w->VTABLE = &ltable_VTABLE;
w->Columns = tableColumns; w->Columns = tableColumns;
w->NumColumns = Array_Elems(tableColumns); w->NumColumns = Array_Elems(tableColumns);
@ -1098,6 +1099,10 @@ void LTable_Init(struct LTable* w, FontDesc* rowFont) {
w->ScrollbarWidth = Display_ScaleX(10); w->ScrollbarWidth = Display_ScaleX(10);
w->GridlineWidth = Display_ScaleX(2); w->GridlineWidth = Display_ScaleX(2);
w->GridlineHeight = Display_ScaleY(2); w->GridlineHeight = Display_ScaleY(2);
for (i = 0; i < w->NumColumns; i++) {
w->Columns[i].width = Display_ScaleX(w->Columns[i].width);
}
} }
void LTable_Reset(struct LTable* w) { void LTable_Reset(struct LTable* w) {

View File

@ -2947,7 +2947,7 @@ static void JNICALL java_onLowMemory(JNIEnv* env, jobject o) {
/* TODO: Low memory */ /* TODO: Low memory */
} }
static const JNINativeMethod methods[19] = { static const JNINativeMethod methods[18] = {
{ "processKeyDown", "(I)V", java_processKeyDown }, { "processKeyDown", "(I)V", java_processKeyDown },
{ "processKeyUp", "(I)V", java_processKeyUp }, { "processKeyUp", "(I)V", java_processKeyUp },
{ "processKeyChar", "(I)V", java_processKeyChar }, { "processKeyChar", "(I)V", java_processKeyChar },
@ -2986,7 +2986,7 @@ void Window_Init(void) {
void Window_Create(int width, int height) { void Window_Create(int width, int height) {
Window_Exists = true; Window_Exists = true;
/* actual window creation is done when processSurfaceCreated is called */ /* actual window creation is done when processSurfaceCreated is received */
} }
void Window_SetTitle(const String* title) { void Window_SetTitle(const String* title) {