diff --git a/src/add-ons/network_settings/dnsclient/DNSSettingsView.cpp b/src/add-ons/network_settings/dnsclient/DNSSettingsView.cpp
index f1ee881..220774a 100644
a
|
b
|
|
19 | 19 | #include <Box.h> |
20 | 20 | #include <Button.h> |
21 | 21 | #include <Catalog.h> |
| 22 | #include <ControlLook.h> |
22 | 23 | #include <File.h> |
23 | 24 | #include <FindDirectory.h> |
24 | 25 | #include <LayoutBuilder.h> |
… |
… |
DNSSettingsView::DNSSettingsView(BNetworkSettingsItem* item)
|
46 | 47 | BView("dns", 0), |
47 | 48 | fItem(item) |
48 | 49 | { |
| 50 | BStringView* titleView = new BStringView("title", |
| 51 | B_TRANSLATE("DNS settings")); |
| 52 | titleView->SetFont(be_bold_font); |
| 53 | titleView->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, B_SIZE_UNSET)); |
| 54 | |
49 | 55 | fServerListView = new BListView("nameservers"); |
50 | | fTextControl = new IPAddressControl(AF_UNSPEC, B_TRANSLATE("Server"), |
| 56 | fTextControl = new IPAddressControl(AF_UNSPEC, B_TRANSLATE("DNS server:"), |
51 | 57 | "server"); |
52 | | fTextControl->SetExplicitMinSize(BSize(fTextControl->StringWidth("5") * 18, |
| 58 | fTextControl->SetExplicitMinSize(BSize(fTextControl->StringWidth("5") * 16 |
| 59 | + fTextControl->StringWidth(B_TRANSLATE("DNS server:")), |
53 | 60 | B_SIZE_UNSET)); |
54 | 61 | |
55 | 62 | fAddButton = new BButton(B_TRANSLATE("Add"), new BMessage(kMsgAddServer)); |
… |
… |
DNSSettingsView::DNSSettingsView(BNetworkSettingsItem* item)
|
59 | 66 | fDownButton = new BButton(B_TRANSLATE("Move down"), |
60 | 67 | new BMessage(kMsgMoveDown)); |
61 | 68 | fDownButton->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, B_SIZE_UNSET)); |
62 | | fRemoveButton = new BButton(B_TRANSLATE("Remove"), new BMessage(kMsgDeleteServer)); |
| 69 | fRemoveButton = new BButton(B_TRANSLATE("Remove"), |
| 70 | new BMessage(kMsgDeleteServer)); |
63 | 71 | fRemoveButton->SetExplicitMaxSize(BSize(B_SIZE_UNLIMITED, B_SIZE_UNSET)); |
64 | | |
| 72 | fDomain = new BTextControl(B_TRANSLATE("Domain:"), "", NULL); |
65 | 73 | fApplyButton = new BButton(B_TRANSLATE("Apply"), new BMessage(kMsgApply)); |
66 | 74 | |
67 | | BBox* box = new BBox("dns"); |
68 | | box->SetLabel(B_TRANSLATE("DNS servers")); |
69 | | box->AddChild(BLayoutBuilder::Grid<>() |
70 | | .SetInsets(B_USE_DEFAULT_SPACING) |
| 75 | float spacing = be_control_look->DefaultItemSpacing(); |
| 76 | |
| 77 | BGridView* serviceGridView = new BGridView(); |
| 78 | BLayoutBuilder::Grid<>(serviceGridView) |
71 | 79 | .Add(fTextControl, 0, 0) |
72 | 80 | .Add(fAddButton, 1, 0) |
73 | 81 | .Add(new BScrollView("scroll", fServerListView, 0, false, true), |
… |
… |
DNSSettingsView::DNSSettingsView(BNetworkSettingsItem* item)
|
75 | 83 | .Add(fUpButton, 1, 1) |
76 | 84 | .Add(fDownButton, 1, 2) |
77 | 85 | .Add(fRemoveButton, 1, 3) |
78 | | .View()); |
| 86 | .SetColumnWeight(0, 10.f); |
79 | 87 | |
80 | 88 | BLayoutBuilder::Group<>(this, B_VERTICAL) |
81 | | .Add(box) |
82 | | .Add(fDomain = new BTextControl(B_TRANSLATE("Domain"), "", NULL)) |
| 89 | .Add(titleView) |
| 90 | .Add(serviceGridView) |
| 91 | .Add(fDomain) |
| 92 | .AddStrut(spacing) |
83 | 93 | .AddGroup(B_HORIZONTAL) |
84 | 94 | .AddGlue() |
85 | 95 | .Add(fApplyButton); |