refactor: GUI, Mainwindow use the system hyperlink color to color the text of the 'primary' Ip address

This commit is contained in:
sithlord48 2025-08-07 08:53:56 -04:00 committed by Chris Rizzitello
parent 8d92a8df68
commit a7048f76f9
2 changed files with 2 additions and 3 deletions

View file

@ -1008,10 +1008,10 @@ QString MainWindow::getIPAddresses() const
!address.isInSubnet(QHostAddress::parseSubnet("169.254.0.0/16"))) {
// usually 192.168.x.x is a useful ip for the user, so indicate
// this by making it bold.
// this by coloring it in the "link" color.
if (!hinted && address.isInSubnet(localnet)) {
QString format = R"(<span style="color:%1;">%2</span>)";
result.append(format.arg(kColorTertiary, address.toString()));
result.append(format.arg(palette().link().color().name(), address.toString()));
hinted = true;
} else {
result.append(address.toString());

View file

@ -12,7 +12,6 @@ namespace deskflow::gui {
const auto kColorWhite = "#ffffff";
const auto kColorSecondary = "#4285f4";
const auto kColorTertiary = "#33b2cc";
const auto kColorError = "#ec4c47";
const auto kColorLightGrey = "#666666";