This commit is contained in:
Nicolas Werner 2020-12-08 20:52:57 +01:00
parent 622a9f709b
commit 77002f17c8
4 changed files with 9 additions and 5 deletions

View file

@ -56,6 +56,7 @@ can be found in the [Github releases](https://github.com/Nheko-Reborn/nheko/rele
[![Packaging status](https://repology.org/badge/tiny-repos/nheko.svg)](https://repology.org/project/nheko/versions) [![Packaging status](https://repology.org/badge/tiny-repos/nheko.svg)](https://repology.org/project/nheko/versions)
#### Arch Linux #### Arch Linux
```bash ```bash
pacaur -S nheko # nheko-git pacaur -S nheko # nheko-git
``` ```

View file

@ -602,8 +602,9 @@ send_key_request_for(mtx::events::EncryptedEvent<mtx::events::msg::Encrypted> e,
e.content.session_id); e.content.session_id);
mtx::events::msg::KeyRequest request; mtx::events::msg::KeyRequest request;
request.action = !cancel ? mtx::events::msg::RequestAction::Request request.action = cancel ? mtx::events::msg::RequestAction::Cancellation
: mtx::events::msg::RequestAction::Cancellation; : mtx::events::msg::RequestAction::Request;
request.algorithm = MEGOLM_ALGO; request.algorithm = MEGOLM_ALGO;
request.room_id = e.room_id; request.room_id = e.room_id;
request.sender_key = e.content.sender_key; request.sender_key = e.content.sender_key;

View file

@ -405,7 +405,9 @@ void
RegisterPage::onRegisterButtonClicked() RegisterPage::onRegisterButtonClicked()
{ {
if (!checkFields()) { if (!checkFields()) {
showError(error_label_, tr("One or more fields have invalid inputs. Please correct those issues and try again.")); showError(error_label_,
tr("One or more fields have invalid inputs. Please correct those issues "
"and try again."));
return; return;
} else { } else {
auto username = username_input_->text().toStdString(); auto username = username_input_->text().toStdString();

View file

@ -639,7 +639,7 @@ utils::luminance(const QColor &col)
for (int i = 0; i < 3; i++) { for (int i = 0; i < 3; i++) {
qreal v = colRgb[i] / 255.0; qreal v = colRgb[i] / 255.0;
v <= 0.03928 ? lumRgb[i] = v / 12.92 : lumRgb[i] = qPow((v + 0.055) / 1.055, 2.4); lumRgb[i] = v <= 0.03928 ? v / 12.92 : qPow((v + 0.055) / 1.055, 2.4);
} }
auto lum = lumRgb[0] * 0.2126 + lumRgb[1] * 0.7152 + lumRgb[2] * 0.0722; auto lum = lumRgb[0] * 0.2126 + lumRgb[1] * 0.7152 + lumRgb[2] * 0.0722;