mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Indicate read-only status in tabs (#6783)
This commit is contained in:
parent
7dc123b790
commit
1d266c8cfa
@ -441,6 +441,7 @@ dist_images_DATA1X = \
|
|||||||
images/dialog-toggle_toc.png \
|
images/dialog-toggle_toc.png \
|
||||||
images/down.png \
|
images/down.png \
|
||||||
images/editclear.png \
|
images/editclear.png \
|
||||||
|
images/emblem-readonly.png \
|
||||||
images/ert-insert.png \
|
images/ert-insert.png \
|
||||||
images/file-open.png \
|
images/file-open.png \
|
||||||
images/float-insert_figure.png \
|
images/float-insert_figure.png \
|
||||||
|
BIN
lib/images/emblem-readonly.png
Normal file
BIN
lib/images/emblem-readonly.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
lib/images/emblem-readonly.svgz
Normal file
BIN
lib/images/emblem-readonly.svgz
Normal file
Binary file not shown.
@ -2011,8 +2011,14 @@ void TabWorkArea::updateTabTexts()
|
|||||||
QString tab_text = it->displayString().replace("&", "&&");
|
QString tab_text = it->displayString().replace("&", "&&");
|
||||||
if (!buf.fileName().empty() && !buf.isClean())
|
if (!buf.fileName().empty() && !buf.isClean())
|
||||||
tab_text += "*";
|
tab_text += "*";
|
||||||
|
QString tab_tooltip = it->abs();
|
||||||
|
if (buf.isReadonly()) {
|
||||||
|
setTabIcon(tab_index, QIcon(getPixmap("images/", "emblem-readonly", "svgz,png")));
|
||||||
|
tab_tooltip = qt_("%1 (read only)").arg(it->abs());
|
||||||
|
} else
|
||||||
|
setTabIcon(tab_index, QIcon());
|
||||||
setTabText(tab_index, tab_text);
|
setTabText(tab_index, tab_text);
|
||||||
setTabToolTip(tab_index, it->abs());
|
setTabToolTip(tab_index, tab_tooltip);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user