summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClement Tsang <34804052+ClementTsang@users.noreply.github.com>2021-01-12 21:41:59 -0500
committerClementTsang <cjhtsang@uwaterloo.ca>2021-01-25 01:31:54 -0500
commit6d0e8e14593e47db14e392465d47f14b4176c950 (patch)
tree70c40202e5ec3c857c286acf50e18fc4a9ef1ebb
parent4eb86b7601b6e89a3862c3d079f3706a5668c111 (diff)
bug: Fix missing sorting arrow when for non-% mem (#389)
Fixes a bug where you could make the sorting arrow disappear in the mem column if you did: 1. Go to proc widget 2. Switch to memory values from % 3. Press `m` (cherry picked from commit e30518bf6213bb99d333f836ecaeb252f967d41e)
-rw-r--r--CHANGELOG.md6
-rw-r--r--Cargo.lock4
-rw-r--r--Cargo.toml4
-rw-r--r--src/app.rs14
4 files changed, 21 insertions, 7 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a14a0023..82ecc3ab 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -15,6 +15,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## Bug Fixes
+- [#373](https://github.com/ClementTsang/bottom/pull/373): Fixes incorrect colours being used the CPU widget in basic mode.
+
+- [#386](https://github.com/ClementTsang/bottom/pull/386): Fixes `hide_table_gap` not working in the battery widget.
+
+- [#389](https://github.com/ClementTsang/bottom/pull/389): Fixes the sorting arrow disappearing in proc widget under some cases.
+
## [0.5.6] - 2020-12-17
## Bug Fixes
diff --git a/Cargo.lock b/Cargo.lock
index ac817d83..2593e966 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -1095,9 +1095,9 @@ dependencies = [
[[package]]
name = "predicates"
-version = "1.0.5"
+version = "1.0.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96bfead12e90dccead362d62bb2c90a5f6fc4584963645bc7f71a735e0b0735a"
+checksum = "73dd9b7b200044694dfede9edf907c1ca19630908443e9447e624993700c6932"
dependencies = [
"difference",
"float-cmp",
diff --git a/Cargo.toml b/Cargo.toml
index d005431c..f162dfde 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -64,8 +64,8 @@ heim = { version = "0.1.0-rc.1", features = ["disk", "memory", "net", "sensors"]
winapi = "0.3.9"
[dev-dependencies]
-assert_cmd = "~1.0"
-predicates = "1"
+assert_cmd = "1.0.2"
+predicates = "1.0.6"
[build-dependencies]
clap = "2.33"
diff --git a/src/app.rs b/src/app.rs
index d66ce89c..5cf25c6c 100644
--- a/src/app.rs
+++ b/src/app.rs
@@ -1271,13 +1271,21 @@ impl App {
.get_mut_widget_state(self.current_widget.widget_id)
{
match proc_widget_state.process_sorting_type {
- processes::ProcessSorting::MemPercent => {
+ processes::ProcessSorting::MemPercent
+ | processes::ProcessSorting::Mem => {
proc_widget_state.is_process_sort_descending =
!proc_widget_state.is_process_sort_descending
}
+
_ => {
- proc_widget_state.process_sorting_type =
- processes::ProcessSorting::MemPercent;
+ proc_widget_state.process_sorting_type = if proc_widget_state
+ .columns
+ .is_enabled(&processes::ProcessSorting::MemPercent)
+ {
+ processes::ProcessSorting::MemPercent
+ } else {
+ processes::ProcessSorting::Mem
+ };
proc_widget_state.is_process_sort_descending = true;
}
}