Author: axeld Date: 2009-11-06 16:47:35 +0100 (Fri, 06 Nov 2009) New Revision: 33920 Changeset: http://dev.haiku-os.org/changeset/33920/haiku Modified: haiku/trunk/src/apps/debugger/user_interface/gui/team_window/RegistersView.cpp haiku/trunk/src/apps/debugger/user_interface/gui/team_window/StackTraceView.cpp Log: * Improved default column sizes. Maybe the table view class should be able to do so automatically? Modified: haiku/trunk/src/apps/debugger/user_interface/gui/team_window/RegistersView.cpp =================================================================== --- haiku/trunk/src/apps/debugger/user_interface/gui/team_window/RegistersView.cpp 2009-11-06 15:40:57 UTC (rev 33919) +++ haiku/trunk/src/apps/debugger/user_interface/gui/team_window/RegistersView.cpp 2009-11-06 15:47:35 UTC (rev 33920) @@ -9,6 +9,8 @@ #include <new> +#include <ControlLook.h> + #include "table/TableColumns.h" #include "Architecture.h" @@ -237,9 +239,13 @@ AddChild(fRegisterTable->ToView()); // columns - fRegisterTable->AddColumn(new StringTableColumn(0, "Register", 80, 40, 1000, + fRegisterTable->AddColumn(new StringTableColumn(0, "Register", + be_plain_font->StringWidth("Register") + + be_control_look->DefaultLabelSpacing() * 2 + 5, 40, 1000, B_TRUNCATE_END, B_ALIGN_LEFT)); - fRegisterTable->AddColumn(new RegisterValueColumn(1, "Value", 80, 40, 1000, + fRegisterTable->AddColumn(new RegisterValueColumn(1, "Value", + be_plain_font->StringWidth("0x00000000") + + be_control_look->DefaultLabelSpacing() * 2 + 5, 40, 1000, B_TRUNCATE_END, B_ALIGN_RIGHT)); fRegisterTableModel = new RegisterTableModel(fArchitecture); Modified: haiku/trunk/src/apps/debugger/user_interface/gui/team_window/StackTraceView.cpp =================================================================== --- haiku/trunk/src/apps/debugger/user_interface/gui/team_window/StackTraceView.cpp 2009-11-06 15:40:57 UTC (rev 33919) +++ haiku/trunk/src/apps/debugger/user_interface/gui/team_window/StackTraceView.cpp 2009-11-06 15:47:35 UTC (rev 33920) @@ -10,6 +10,8 @@ #include <new> +#include <ControlLook.h> + #include "table/TableColumns.h" #include "FunctionInstance.h" @@ -214,11 +216,14 @@ AddChild(fFramesTable->ToView()); fFramesTable->SetSortingEnabled(false); + float addressWidth = be_plain_font->StringWidth("0x00000000") + + be_control_look->DefaultLabelSpacing() * 2 + 5; + // columns - fFramesTable->AddColumn(new TargetAddressTableColumn(0, "Frame", 80, 40, - 1000, B_TRUNCATE_END, B_ALIGN_RIGHT)); - fFramesTable->AddColumn(new TargetAddressTableColumn(1, "IP", 80, 40, 1000, - B_TRUNCATE_END, B_ALIGN_RIGHT)); + fFramesTable->AddColumn(new TargetAddressTableColumn(0, "Frame", + addressWidth, 40, 1000, B_TRUNCATE_END, B_ALIGN_RIGHT)); + fFramesTable->AddColumn(new TargetAddressTableColumn(1, "IP", addressWidth, + 40, 1000, B_TRUNCATE_END, B_ALIGN_RIGHT)); fFramesTable->AddColumn(new StringTableColumn(2, "Function", 300, 100, 1000, B_TRUNCATE_END, B_ALIGN_LEFT));