Rename colors
This commit is contained in:
@@ -109,20 +109,20 @@ void DrawWindow(Window *window, Event &event) {
|
|||||||
bool is_active = window->id == ActiveWindowID;
|
bool is_active = window->id == ActiveWindowID;
|
||||||
bool active_layed_out_doc = window->id == LastActiveLayoutWindowID;
|
bool active_layed_out_doc = window->id == LastActiveLayoutWindowID;
|
||||||
|
|
||||||
Color color_whitespace_during_selection = ColorWhitespaceDuringSelection;
|
Color color_whitespace_during_selection = SelectedWhitespaceColor;
|
||||||
Color color_background = ColorBackground;
|
Color color_background = BackgroundColor;
|
||||||
Color color_line_highlight = ColorLineHighlight;
|
Color color_line_highlight = LineHighlightColor;
|
||||||
Color color_selection = ColorSelection;
|
Color color_selection = SelectionColor;
|
||||||
Color color_main_caret = ColorMainCaret;
|
Color color_main_caret = PrimaryCaretColor;
|
||||||
Color color_sub_caret = ColorSubCaret;
|
Color color_sub_caret = SecondaryCaretColor;
|
||||||
Color color_text_line_numbers = ColorTextLineNumbers;
|
Color color_text_line_numbers = LineNumberTextColor;
|
||||||
Color color_text = ColorText;
|
Color color_text = TextColor;
|
||||||
|
|
||||||
if (window->draw_darker) {
|
if (window->draw_darker) {
|
||||||
color_background = ColorTitleBarBackground;
|
color_background = SecondaryWindowStyle_BackgroundColor;
|
||||||
color_selection = ColorTitleBarSelection;
|
color_selection = SecondaryWindowStyle_SelectionColor;
|
||||||
color_text = ColorTitleBarText;
|
color_text = SecondaryWindowStyle_TextColor;
|
||||||
color_line_highlight = ColorTitleBarLineHighlight;
|
color_line_highlight = SecondaryWindowStyle_LineHighlightColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -210,7 +210,7 @@ void DrawWindow(Window *window, Event &event) {
|
|||||||
if (p != -1) {
|
if (p != -1) {
|
||||||
Range range = EncloseLoadWord(buffer, p);
|
Range range = EncloseLoadWord(buffer, p);
|
||||||
if (InBounds(caret.range, p)) range = caret.range;
|
if (InBounds(caret.range, p)) range = caret.range;
|
||||||
DrawUnderline(window, view, buffer, range, ColorMouseUnderline, 2);
|
DrawUnderline(window, view, buffer, range, MouseUnderlineColor, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -218,9 +218,9 @@ void DrawWindow(Window *window, Event &event) {
|
|||||||
if (is_active) {
|
if (is_active) {
|
||||||
if (GetSize(caret.range) == 0) {
|
if (GetSize(caret.range) == 0) {
|
||||||
Range range = EncloseLoadWord(buffer, caret.range.min);
|
Range range = EncloseLoadWord(buffer, caret.range.min);
|
||||||
DrawUnderline(window, view, buffer, range, ColorCaretUnderline);
|
DrawUnderline(window, view, buffer, range, CaretUnderlineColor);
|
||||||
} else {
|
} else {
|
||||||
DrawUnderline(window, view, buffer, caret.range, ColorCaretUnderline);
|
DrawUnderline(window, view, buffer, caret.range, CaretUnderlineColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -272,11 +272,11 @@ void DrawWindow(Window *window, Event &event) {
|
|||||||
if (DrawScrollbar && window->draw_scrollbar) {
|
if (DrawScrollbar && window->draw_scrollbar) {
|
||||||
ProfileScope(DrawScrollbar);
|
ProfileScope(DrawScrollbar);
|
||||||
SetScissor(window->scrollbar_rect);
|
SetScissor(window->scrollbar_rect);
|
||||||
DrawRect(window->scrollbar_rect, ColorScrollbarBackground);
|
DrawRect(window->scrollbar_rect, ScrollbarBackgroundColor);
|
||||||
Scroller scroller = ComputeScrollerRect(window);
|
Scroller scroller = ComputeScrollerRect(window);
|
||||||
Rect2 rect = Shrink(scroller.rect, 2);
|
Rect2 rect = Shrink(scroller.rect, 2);
|
||||||
Color color = ColorScrollbarScroller;
|
Color color = ScrollerColor;
|
||||||
if (ScrollbarSelected.id == window->id.id) color = ColorScrollbarScrollerSelected;
|
if (ScrollbarSelected.id == window->id.id) color = ScrollerSelectedColor;
|
||||||
DrawRect(rect, color);
|
DrawRect(rect, color);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -290,21 +290,21 @@ void DrawWindow(Window *window, Event &event) {
|
|||||||
if (window->draw_darker) {
|
if (window->draw_darker) {
|
||||||
SetScissor(window->total_rect);
|
SetScissor(window->total_rect);
|
||||||
Rect2I rect = window->total_rect;
|
Rect2I rect = window->total_rect;
|
||||||
DrawRect(CutTop(&rect, 1), ColorTitleBarOutline);
|
DrawRect(CutTop(&rect, 1), SecondaryWindowStyle_OutlineColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
// darken the inactive windows
|
// darken the inactive windows
|
||||||
if (!is_active && !active_layed_out_doc) {
|
if (!is_active && !active_layed_out_doc) {
|
||||||
ProfileScope(DarkenInactiveRect);
|
ProfileScope(DarkenInactiveRect);
|
||||||
SetScissor(screen_rect);
|
SetScissor(screen_rect);
|
||||||
DrawRect(window->total_rect, ColorInactiveWindow);
|
DrawRect(window->total_rect, InactiveWindowColor);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Draw resizer rect
|
// Draw resizer rect
|
||||||
if (GetSize(window->resizer_rect).x > 0){
|
if (GetSize(window->resizer_rect).x > 0){
|
||||||
Rect2I rect = window->resizer_rect;
|
Rect2I rect = window->resizer_rect;
|
||||||
SetScissor(window->resizer_rect);
|
SetScissor(window->resizer_rect);
|
||||||
DrawRect(rect, ColorResizerBackground);
|
DrawRect(rect, ResizerBackgroundColor);
|
||||||
DrawRect(CutRight(&rect, 1), ColorResizerOutline);
|
DrawRect(CutRight(&rect, 1), ResizerOutlineColor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,28 +131,27 @@ Color GruvboxFadedBlue = {0x07, 0x66, 0x78, 0xff};
|
|||||||
Color GruvboxFadedPurple = {0x8f, 0x3f, 0x71, 0xff};
|
Color GruvboxFadedPurple = {0x8f, 0x3f, 0x71, 0xff};
|
||||||
Color GruvboxFadedAqua = {0x42, 0x7b, 0x58, 0xff};
|
Color GruvboxFadedAqua = {0x42, 0x7b, 0x58, 0xff};
|
||||||
Color GruvboxFadedOrange = {0xaf, 0x3a, 0x03, 0xff};
|
Color GruvboxFadedOrange = {0xaf, 0x3a, 0x03, 0xff};
|
||||||
RegisterVariable(Color, ColorText, GruvboxDark0Hard);
|
RegisterVariable(Color, TextColor, GruvboxDark0Hard);
|
||||||
RegisterVariable(Color, ColorLoadTextHighlight, {0x00, 0x00, 0x00, 0x0F});
|
RegisterVariable(Color, BackgroundColor, GruvboxLight0Hard);
|
||||||
RegisterVariable(Color, ColorBackground, GruvboxLight0Hard);
|
RegisterVariable(Color, InactiveWindowColor, {0x00, 0x00, 0x00, 0x1F});
|
||||||
RegisterVariable(Color, ColorInactiveWindow, {0x00, 0x00, 0x00, 0x1F});
|
RegisterVariable(Color, LineNumberTextColor, GruvboxDark4);
|
||||||
RegisterVariable(Color, ColorTextLineNumbers, GruvboxDark4);
|
RegisterVariable(Color, LineHighlightColor, GruvboxLight0Soft);
|
||||||
RegisterVariable(Color, ColorLineHighlight, GruvboxLight0Soft);
|
RegisterVariable(Color, PrimaryCaretColor, GruvboxDark0Hard);
|
||||||
RegisterVariable(Color, ColorMainCaret, GruvboxDark0Hard);
|
RegisterVariable(Color, SecondaryCaretColor, GruvboxGray245);
|
||||||
RegisterVariable(Color, ColorSubCaret, GruvboxGray245);
|
RegisterVariable(Color, SelectionColor, GruvboxLight1);
|
||||||
RegisterVariable(Color, ColorSelection, GruvboxLight1);
|
RegisterVariable(Color, SelectedWhitespaceColor, GruvboxLight4);
|
||||||
RegisterVariable(Color, ColorWhitespaceDuringSelection, GruvboxLight4);
|
RegisterVariable(Color, MouseUnderlineColor, GruvboxDark0Hard);
|
||||||
RegisterVariable(Color, ColorMouseUnderline, GruvboxDark0Hard);
|
RegisterVariable(Color, CaretUnderlineColor, GruvboxGray245);
|
||||||
RegisterVariable(Color, ColorCaretUnderline, GruvboxGray245);
|
RegisterVariable(Color, ScrollbarBackgroundColor, GruvboxLight2);
|
||||||
RegisterVariable(Color, ColorScrollbarBackground, GruvboxLight2);
|
RegisterVariable(Color, ScrollerColor, GruvboxLight1);
|
||||||
RegisterVariable(Color, ColorScrollbarScroller, GruvboxLight1);
|
RegisterVariable(Color, ScrollerSelectedColor, GruvboxLight0Hard);
|
||||||
RegisterVariable(Color, ColorScrollbarScrollerSelected, GruvboxLight0Hard);
|
RegisterVariable(Color, SecondaryWindowStyle_TextColor, GruvboxDark0Hard);
|
||||||
RegisterVariable(Color, ColorTitleBarText, GruvboxDark0Hard);
|
RegisterVariable(Color, SecondaryWindowStyle_BackgroundColor, GruvboxLight0Hard);
|
||||||
RegisterVariable(Color, ColorTitleBarBackground, GruvboxLight0Hard);
|
RegisterVariable(Color, SecondaryWindowStyle_SelectionColor, GruvboxLight3);
|
||||||
RegisterVariable(Color, ColorTitleBarSelection, GruvboxLight3);
|
RegisterVariable(Color, SecondaryWindowStyle_LineHighlightColor, GruvboxLight0Soft);
|
||||||
RegisterVariable(Color, ColorTitleBarLineHighlight, GruvboxLight0Soft);
|
RegisterVariable(Color, SecondaryWindowStyle_OutlineColor, GruvboxLight3);
|
||||||
RegisterVariable(Color, ColorTitleBarOutline, GruvboxLight3);
|
RegisterVariable(Color, ResizerBackgroundColor, GruvboxLight0Hard);
|
||||||
RegisterVariable(Color, ColorResizerBackground, GruvboxLight0Hard);
|
RegisterVariable(Color, ResizerOutlineColor, GruvboxLight3);
|
||||||
RegisterVariable(Color, ColorResizerOutline, GruvboxLight3);
|
|
||||||
RegisterVariable(Int, WaitForEvents, 1);
|
RegisterVariable(Int, WaitForEvents, 1);
|
||||||
RegisterVariable(Int, DrawLineNumbers, 1);
|
RegisterVariable(Int, DrawLineNumbers, 1);
|
||||||
RegisterVariable(Int, DrawScrollbar, 1);
|
RegisterVariable(Int, DrawScrollbar, 1);
|
||||||
|
|||||||
@@ -728,7 +728,7 @@ void MainLoop() {
|
|||||||
if (!it->visible) continue;
|
if (!it->visible) continue;
|
||||||
DrawWindow(it, *GetLast(frame_events));
|
DrawWindow(it, *GetLast(frame_events));
|
||||||
}
|
}
|
||||||
EndFrameRender(event->xwindow, event->ywindow, ColorBackground);
|
EndFrameRender(event->xwindow, event->ywindow, BackgroundColor);
|
||||||
SDL_GL_SwapWindow(SDLWindow);
|
SDL_GL_SwapWindow(SDLWindow);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user