summaryrefslogtreecommitdiff
path: root/src/ui/ui_expenses.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/ui_expenses.cpp')
-rw-r--r--src/ui/ui_expenses.cpp37
1 files changed, 9 insertions, 28 deletions
diff --git a/src/ui/ui_expenses.cpp b/src/ui/ui_expenses.cpp
index 7c9f596..35adea0 100644
--- a/src/ui/ui_expenses.cpp
+++ b/src/ui/ui_expenses.cpp
@@ -226,8 +226,11 @@ static void draw_expenses_list()
ImGui::TableSetupColumn(locale::get("invoice.table.issuedat"), ImGuiTableColumnFlags_WidthFixed, 90);
ImGui::TableSetupColumn(locale::get("invoice.table.total"), ImGuiTableColumnFlags_WidthFixed, 90);
ImGui::TableSetupColumn(locale::get("invoice.table.status"), ImGuiTableColumnFlags_WidthFixed, 90);
+ ImGui::PushFont(ui::fontBold);
ImGui::TableHeadersRow();
+ ImGui::PopFont();
+ ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0, 0));
for (u32 i = 0; i < invoice_count; i++) {
invoice c = invoice_list[i];
@@ -237,7 +240,7 @@ static void draw_expenses_list()
ImGui::PushID(i);
ImGuiSelectableFlags selectable_flags = ImGuiSelectableFlags_SpanAllColumns | ImGuiSelectableFlags_AllowOverlap;
bool selected = false;
- if (ImGui::Selectable("##invisible_selectable", selected, selectable_flags, ImVec2(0, ImGui::GetFrameHeight()-4.0f)))
+ if (ImGui::Selectable("##invisible_selectable", selected, selectable_flags, ImVec2(0, ImGui::GetFrameHeight()+2.0f)))
{
_set_active_invoice(c);
current_view_state = ui::view_state::VIEW_EXISTING;
@@ -265,30 +268,8 @@ static void draw_expenses_list()
ImGui::TableSetColumnIndex(3); ImGui::Text(buf);
ImGui::TableSetColumnIndex(4); ImGui::Text("%.2f %s", c.total, c.currency);
ImGui::TableSetColumnIndex(5); ImGui::Text("%s", locale::get(administration::invoice_get_status_string(&c)));
-
- /*
- char btn_name[20];
- strops::format(btn_name, sizeof(btn_name), "%s##%d", locale::get("form.view"), i);
- if (ImGui::Button(btn_name)) {
- active_invoice = c;
- current_view_state = ui::view_state::VIEW_EXISTING;
- }
-
- ImGui::SameLine();
-
- strops::format(btn_name, sizeof(btn_name), "%s##%d", locale::get("form.change"), i);
- if (ImGui::Button(btn_name)) {
- active_invoice = administration::invoice_create_copy(&c); // We create a copy because of billing item list pointers.
- current_view_state = ui::view_state::EDIT_EXISTING;
- }
-
- ImGui::SameLine();
- strops::format(btn_name, sizeof(btn_name), "%s##%d", locale::get("form.delete"), i);
- if (ImGui::Button(btn_name)) {
- selected_for_removal = c;
- ImGui::OpenPopup("ConfirmDeletePopup");
- }*/
}
+ ImGui::PopStyleVar();
ImGui::EndTable();
}
@@ -310,7 +291,7 @@ static void _invoice_saved_callback()
static void _draw_activity_sidepanel()
{
ImGui::SameLine();
- ImGui::SeparatorEx(1 << 1, 3.0f);
+ ImGui::SeparatorEx(1 << 1, 1.0f);
ImGui::SameLine();
ImGui::BeginChild("##historyPanel", ImVec2(sidepanel_width, 0), ImGuiChildFlags_None);
@@ -357,7 +338,7 @@ static void draw_expense_update()
}
ImGui::Spacing();
- ImGui::Separator(3.0f);
+ ImGui::Separator(1.0f);
ImGui::Spacing();
float availableWidth = ImGui::GetContentRegionAvail().x;
@@ -386,7 +367,7 @@ static void draw_expense_create()
}
ImGui::Spacing();
- ImGui::Separator(3.0f);
+ ImGui::Separator(1.0f);
ImGui::Spacing();
float availableWidth = ImGui::GetContentRegionAvail().x;
@@ -409,7 +390,7 @@ static void draw_expense_view()
}
ImGui::Spacing();
- ImGui::Separator(3.0f);
+ ImGui::Separator(1.0f);
ImGui::Spacing();
float availableWidth = ImGui::GetContentRegionAvail().x;