Changeset View
Changeset View
Standalone View
Standalone View
krusader/GUI/kcmdline.cpp
Context not available. | |||||
49 | #include "../krservices.h" | 49 | #include "../krservices.h" | ||
---|---|---|---|---|---|
50 | #include "../ActionMan/addplaceholderpopup.h" | 50 | #include "../ActionMan/addplaceholderpopup.h" | ||
51 | #include "kcmdmodebutton.h" | 51 | #include "kcmdmodebutton.h" | ||
52 | 52 | #include "../compat.h" | |||
53 | 53 | | |||
54 | CmdLineCombo::CmdLineCombo(QWidget *parent) : KHistoryComboBox(parent), _handlingLineEditResize(false) | 54 | CmdLineCombo::CmdLineCombo(QWidget *parent) : KHistoryComboBox(parent), _handlingLineEditResize(false) | ||
55 | { | 55 | { | ||
Context not available. | |||||
88 | { | 88 | { | ||
89 | QString pathNameLabel = _path; | 89 | QString pathNameLabel = _path; | ||
90 | QFontMetrics fm(_pathLabel->fontMetrics()); | 90 | QFontMetrics fm(_pathLabel->fontMetrics()); | ||
91 | int textWidth = fm.width(_path); | 91 | int textWidth = fm.QFONTMETRICS_WIDTH(_path); | ||
92 | int maxWidth = (width() + _pathLabel->width()) * 2 / 5; | 92 | int maxWidth = (width() + _pathLabel->width()) * 2 / 5; | ||
93 | int letters = _path.length() / 2; | 93 | int letters = _path.length() / 2; | ||
94 | 94 | | |||
95 | while (letters && textWidth > maxWidth) { | 95 | while (letters && textWidth > maxWidth) { | ||
96 | pathNameLabel = _path.left(letters) + "..." + _path.right(letters); | 96 | pathNameLabel = _path.left(letters) + "..." + _path.right(letters); | ||
97 | letters--; | 97 | letters--; | ||
98 | textWidth = fm.width(pathNameLabel); | 98 | textWidth = fm.QFONTMETRICS_WIDTH(pathNameLabel); | ||
99 | } | 99 | } | ||
100 | 100 | | |||
101 | _pathLabel->setText(pathNameLabel + "> "); | 101 | _pathLabel->setText(pathNameLabel + "> "); | ||
Context not available. |