68 |
68 |
69 |
69 |
70 uitable->getvalue = args.model->getvalue ? args.model->getvalue : args.getvalue; |
70 uitable->getvalue = args.model->getvalue ? args.model->getvalue : args.getvalue; |
71 |
71 |
72 // grid styling |
72 // grid styling |
73 winrt::Windows::UI::Color bg = { 233, 233, 255, 255 }; // test color |
73 winrt::Windows::UI::Color bg = { 255, 255, 255, 255 }; // test color |
74 SolidColorBrush brush = SolidColorBrush(bg); |
74 SolidColorBrush brush = SolidColorBrush(bg); |
75 grid.Background(brush); |
75 grid.Background(brush); |
76 |
76 |
77 // add columns from args.model |
77 // add columns from args.model |
78 uitable->add_header(args.model); |
78 uitable->add_header(args.model); |
107 |
107 |
108 UiTable::UiTable(winrt::Microsoft::UI::Xaml::Controls::ScrollViewer scrollW, winrt::Microsoft::UI::Xaml::Controls::Grid grid) { |
108 UiTable::UiTable(winrt::Microsoft::UI::Xaml::Controls::ScrollViewer scrollW, winrt::Microsoft::UI::Xaml::Controls::Grid grid) { |
109 this->scrollw = scrollw; |
109 this->scrollw = scrollw; |
110 this->grid = grid; |
110 this->grid = grid; |
111 |
111 |
112 winrt::Windows::UI::Color highlightBg = { 120, 120, 255, 255 }; // test color |
112 winrt::Windows::UI::Color highlightBg = { 255, 234, 234, 234 }; |
113 highlightBrush = SolidColorBrush(highlightBg); |
113 highlightBrush = SolidColorBrush(highlightBg); |
114 |
114 |
115 winrt::Windows::UI::Color defaultBg = { 0, 0, 0, 0 }; // default |
115 winrt::Windows::UI::Color defaultBg = { 0, 0, 0, 0 }; // default |
116 defaultBrush = SolidColorBrush(defaultBg); |
116 defaultBrush = SolidColorBrush(defaultBg); |
117 |
117 |
118 winrt::Windows::UI::Color selectedBg = { 255, 120, 120, 255 }; // test color |
118 winrt::Windows::UI::Color selectedBg = { 255, 204, 232, 255 }; // test color |
119 selectedBrush = SolidColorBrush(selectedBg); |
119 selectedBrush = SolidColorBrush(selectedBg); |
120 |
120 |
121 winrt::Windows::UI::Color selectedFg = { 255, 20, 20, 255 }; // test color |
121 winrt::Windows::UI::Color selectedFg = { 255, 0, 90, 158 }; // test color |
122 selectedBorderBrush = SolidColorBrush(selectedFg); |
122 selectedBorderBrush = SolidColorBrush(selectedFg); |
123 } |
123 } |
124 |
124 |
125 void UiTable::add_header(UiModel* model) { |
125 void UiTable::add_header(UiModel* model) { |
126 GridLength gl; |
126 GridLength gl; |