change: make table headers bold by default (#1513)

* change: make table headers bold by default

* changelog
This commit is contained in:
Clement Tsang 2024-07-31 00:37:38 +00:00 committed by GitHub
parent 08a7b8b860
commit c77256eaaf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 14 additions and 13 deletions

View file

@ -37,6 +37,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- [#1499](https://github.com/ClementTsang/bottom/pull/1499): Redesign how styling is configured. - [#1499](https://github.com/ClementTsang/bottom/pull/1499): Redesign how styling is configured.
- [#1499](https://github.com/ClementTsang/bottom/pull/1499): The following arguments have changed names: - [#1499](https://github.com/ClementTsang/bottom/pull/1499): The following arguments have changed names:
- `--colors` is now `--theme` - `--colors` is now `--theme`
- [#1513](https://github.com/ClementTsang/bottom/pull/1513): Table headers are now bold by default.
### Bug Fixes ### Bug Fixes

View file

@ -138,7 +138,7 @@
# - "nord-light". # - "nord-light".
# #
# This will have the lowest precedence if a custom colour palette is set, # This will have the lowest precedence if a custom colour palette is set,
# or overriden if the command-line flag for a built-in theme is set. # or overridden if the command-line flag for a built-in theme is set.
#theme = "default" #theme = "default"
#[styles.cpu] #[styles.cpu]
@ -165,7 +165,7 @@
#low_battery_color = "red" #low_battery_color = "red"
#[styles.tables] #[styles.tables]
#headers = {color = "light blue"} #headers = {color = "light blue", bold = true}
#[styles.graphs] #[styles.graphs]
#graph_color = "gray" #graph_color = "gray"

View file

@ -402,7 +402,7 @@ pub const CONFIG_TEXT: &str = r#"# This is a default config file for bottom. Al
# - "nord-light". # - "nord-light".
# #
# This will have the lowest precedence if a custom colour palette is set, # This will have the lowest precedence if a custom colour palette is set,
# or overriden if the command-line flag for a built-in theme is set. # or overridden if the command-line flag for a built-in theme is set.
#theme = "default" #theme = "default"
#[styles.cpu] #[styles.cpu]
@ -429,7 +429,7 @@ pub const CONFIG_TEXT: &str = r#"# This is a default config file for bottom. Al
#low_battery_color = "red" #low_battery_color = "red"
#[styles.tables] #[styles.tables]
#headers = {color = "light blue"} #headers = {color = "light blue", bold = true}
#[styles.graphs] #[styles.graphs]
#graph_color = "gray" #graph_color = "gray"

View file

@ -1,4 +1,4 @@
use tui::style::{Color, Style}; use tui::style::{Color, Modifier, Style};
use crate::options::config::style::ColourPalette; use crate::options::config::style::ColourPalette;
@ -22,7 +22,7 @@ impl ColourPalette {
Self { Self {
selected_text_style: DEFAULT_SELECTED_TEXT_STYLE, selected_text_style: DEFAULT_SELECTED_TEXT_STYLE,
table_header_style: color!(HIGHLIGHT_COLOUR), table_header_style: color!(HIGHLIGHT_COLOUR).add_modifier(Modifier::BOLD),
ram_style: color!(FIRST_COLOUR), ram_style: color!(FIRST_COLOUR),
#[cfg(not(target_os = "windows"))] #[cfg(not(target_os = "windows"))]
cache_style: color!(FIFTH_COLOUR), cache_style: color!(FIFTH_COLOUR),
@ -70,7 +70,7 @@ impl ColourPalette {
pub fn default_light_mode() -> Self { pub fn default_light_mode() -> Self {
Self { Self {
selected_text_style: color!(Color::White), selected_text_style: color!(Color::White),
table_header_style: color!(Color::Black), table_header_style: color!(Color::Black).add_modifier(Modifier::BOLD),
ram_style: color!(Color::Blue), ram_style: color!(Color::Blue),
#[cfg(not(target_os = "windows"))] #[cfg(not(target_os = "windows"))]
cache_style: color!(Color::LightRed), cache_style: color!(Color::LightRed),

View file

@ -1,4 +1,4 @@
use tui::style::Color; use tui::style::{Color, Modifier};
use crate::options::config::style::{utils::convert_hex_to_color, ColourPalette}; use crate::options::config::style::{utils::convert_hex_to_color, ColourPalette};
@ -8,7 +8,7 @@ impl ColourPalette {
pub(crate) fn gruvbox_palette() -> Self { pub(crate) fn gruvbox_palette() -> Self {
Self { Self {
selected_text_style: hex!("#1d2021").bg(convert_hex_to_color("#ebdbb2").unwrap()), selected_text_style: hex!("#1d2021").bg(convert_hex_to_color("#ebdbb2").unwrap()),
table_header_style: hex!("#83a598"), table_header_style: hex!("#83a598").add_modifier(Modifier::BOLD),
ram_style: hex!("#8ec07c"), ram_style: hex!("#8ec07c"),
#[cfg(not(target_os = "windows"))] #[cfg(not(target_os = "windows"))]
cache_style: hex!("#b16286"), cache_style: hex!("#b16286"),
@ -68,7 +68,7 @@ impl ColourPalette {
pub(crate) fn gruvbox_light_palette() -> Self { pub(crate) fn gruvbox_light_palette() -> Self {
Self { Self {
selected_text_style: hex!("#ebdbb2").bg(convert_hex_to_color("#3c3836").unwrap()), selected_text_style: hex!("#ebdbb2").bg(convert_hex_to_color("#3c3836").unwrap()),
table_header_style: hex!("#076678"), table_header_style: hex!("#076678").add_modifier(Modifier::BOLD),
ram_style: hex!("#427b58"), ram_style: hex!("#427b58"),
#[cfg(not(target_os = "windows"))] #[cfg(not(target_os = "windows"))]
cache_style: hex!("#d79921"), cache_style: hex!("#d79921"),

View file

@ -1,4 +1,4 @@
use tui::style::Color; use tui::style::{Color, Modifier};
use crate::options::config::style::{utils::convert_hex_to_color, ColourPalette}; use crate::options::config::style::{utils::convert_hex_to_color, ColourPalette};
@ -8,7 +8,7 @@ impl ColourPalette {
pub(crate) fn nord_palette() -> Self { pub(crate) fn nord_palette() -> Self {
Self { Self {
selected_text_style: hex!("#2e3440").bg(convert_hex_to_color("#88c0d0").unwrap()), selected_text_style: hex!("#2e3440").bg(convert_hex_to_color("#88c0d0").unwrap()),
table_header_style: hex!("#81a1c1"), table_header_style: hex!("#81a1c1").add_modifier(Modifier::BOLD),
ram_style: hex!("#88c0d0"), ram_style: hex!("#88c0d0"),
#[cfg(not(target_os = "windows"))] #[cfg(not(target_os = "windows"))]
cache_style: hex!("#d8dee9"), cache_style: hex!("#d8dee9"),
@ -56,7 +56,7 @@ impl ColourPalette {
pub(crate) fn nord_light_palette() -> Self { pub(crate) fn nord_light_palette() -> Self {
Self { Self {
selected_text_style: hex!("#f5f5f5").bg(convert_hex_to_color("#5e81ac").unwrap()), selected_text_style: hex!("#f5f5f5").bg(convert_hex_to_color("#5e81ac").unwrap()),
table_header_style: hex!("#5e81ac"), table_header_style: hex!("#5e81ac").add_modifier(Modifier::BOLD),
ram_style: hex!("#81a1c1"), ram_style: hex!("#81a1c1"),
#[cfg(not(target_os = "windows"))] #[cfg(not(target_os = "windows"))]
cache_style: hex!("#4c566a"), cache_style: hex!("#4c566a"),