Changeset View
Changeset View
Standalone View
Standalone View
src/widgets/kpropertiesdialog.cpp
Show First 20 Lines • Show All 1029 Lines • ▼ Show 20 Line(s) | 1028 | if (!mimeComment.isEmpty() && !isTrash) { | |||
---|---|---|---|---|---|
1030 | grid->addWidget(l, curRow, 0, Qt::AlignRight | Qt::AlignTop); | 1030 | grid->addWidget(l, curRow, 0, Qt::AlignRight | Qt::AlignTop); | ||
1031 | 1031 | | |||
1032 | QFrame *box = new QFrame(d->m_frame); | 1032 | QFrame *box = new QFrame(d->m_frame); | ||
1033 | QVBoxLayout *boxLayout = new QVBoxLayout(box); | 1033 | QVBoxLayout *boxLayout = new QVBoxLayout(box); | ||
1034 | boxLayout->setSpacing(2); // without that spacing the button literally “sticks” to the label ;) | 1034 | boxLayout->setSpacing(2); // without that spacing the button literally “sticks” to the label ;) | ||
1035 | boxLayout->setMargin(0); | 1035 | boxLayout->setMargin(0); | ||
1036 | 1036 | | |||
1037 | l = new QLabel(mimeComment, box); | 1037 | l = new QLabel(mimeComment, box); | ||
1038 | l->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard); | ||||
1038 | grid->addWidget(box, curRow++, 2); | 1039 | grid->addWidget(box, curRow++, 2); | ||
1039 | 1040 | | |||
1040 | QPushButton *button = new QPushButton(box); | 1041 | QPushButton *button = new QPushButton(box); | ||
1041 | button->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); // Minimum still makes the button grow to the entire layout width | 1042 | button->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); // Minimum still makes the button grow to the entire layout width | ||
1042 | button->setIcon(QIcon::fromTheme(QStringLiteral("configure"))); | 1043 | button->setIcon(QIcon::fromTheme(QStringLiteral("configure"))); | ||
1043 | 1044 | | |||
1044 | boxLayout->addWidget(l); | 1045 | boxLayout->addWidget(l); | ||
1045 | boxLayout->addWidget(button); | 1046 | boxLayout->addWidget(button); | ||
Show All 34 Lines | 1069 | if (!directory.isEmpty()) { | |||
1080 | l->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard); | 1081 | l->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard); | ||
1081 | grid->addWidget(l, curRow++, 2); | 1082 | grid->addWidget(l, curRow++, 2); | ||
1082 | } | 1083 | } | ||
1083 | 1084 | | |||
1084 | l = new QLabel(i18n("Size:"), d->m_frame); | 1085 | l = new QLabel(i18n("Size:"), d->m_frame); | ||
1085 | grid->addWidget(l, curRow, 0, Qt::AlignRight); | 1086 | grid->addWidget(l, curRow, 0, Qt::AlignRight); | ||
1086 | 1087 | | |||
1087 | d->m_sizeLabel = new QLabel(d->m_frame); | 1088 | d->m_sizeLabel = new QLabel(d->m_frame); | ||
1089 | d->m_sizeLabel->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard); | ||||
1088 | grid->addWidget(d->m_sizeLabel, curRow++, 2); | 1090 | grid->addWidget(d->m_sizeLabel, curRow++, 2); | ||
1089 | 1091 | | |||
1090 | if (!hasDirs) { // Only files [and symlinks] | 1092 | if (!hasDirs) { // Only files [and symlinks] | ||
1091 | d->m_sizeLabel->setText(QStringLiteral("%1 (%2)").arg(KIO::convertSize(totalSize), | 1093 | d->m_sizeLabel->setText(QStringLiteral("%1 (%2)").arg(KIO::convertSize(totalSize), | ||
1092 | QLocale().toString(totalSize))); | 1094 | QLocale().toString(totalSize))); | ||
1093 | d->m_sizeDetermineButton = nullptr; | 1095 | d->m_sizeDetermineButton = nullptr; | ||
1094 | d->m_sizeStopButton = nullptr; | 1096 | d->m_sizeStopButton = nullptr; | ||
1095 | } else { // Directory | 1097 | } else { // Directory | ||
Show All 38 Lines | 1128 | if (!d->bMultiple) { // Dates for multiple don't make much sense... | |||
1134 | } | 1136 | } | ||
1135 | 1137 | | |||
1136 | dt = item.time(KFileItem::ModificationTime); | 1138 | dt = item.time(KFileItem::ModificationTime); | ||
1137 | if (!dt.isNull()) { | 1139 | if (!dt.isNull()) { | ||
1138 | l = new QLabel(i18n("Modified:"), d->m_frame); | 1140 | l = new QLabel(i18n("Modified:"), d->m_frame); | ||
1139 | grid->addWidget(l, curRow, 0, Qt::AlignRight); | 1141 | grid->addWidget(l, curRow, 0, Qt::AlignRight); | ||
1140 | 1142 | | |||
1141 | l = new QLabel(dt.toString(Qt::DefaultLocaleLongDate), d->m_frame); | 1143 | l = new QLabel(dt.toString(Qt::DefaultLocaleLongDate), d->m_frame); | ||
1144 | l->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard); | ||||
1142 | grid->addWidget(l, curRow++, 2); | 1145 | grid->addWidget(l, curRow++, 2); | ||
1143 | } | 1146 | } | ||
1144 | 1147 | | |||
1145 | dt = item.time(KFileItem::AccessTime); | 1148 | dt = item.time(KFileItem::AccessTime); | ||
1146 | if (!dt.isNull()) { | 1149 | if (!dt.isNull()) { | ||
1147 | l = new QLabel(i18n("Accessed:"), d->m_frame); | 1150 | l = new QLabel(i18n("Accessed:"), d->m_frame); | ||
1148 | grid->addWidget(l, curRow, 0, Qt::AlignRight); | 1151 | grid->addWidget(l, curRow, 0, Qt::AlignRight); | ||
1149 | 1152 | | |||
1150 | l = new QLabel(dt.toString(Qt::DefaultLocaleLongDate), d->m_frame); | 1153 | l = new QLabel(dt.toString(Qt::DefaultLocaleLongDate), d->m_frame); | ||
1154 | l->setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard); | ||||
1151 | grid->addWidget(l, curRow++, 2); | 1155 | grid->addWidget(l, curRow++, 2); | ||
1152 | } | 1156 | } | ||
1153 | } | 1157 | } | ||
1154 | 1158 | | |||
1155 | if (hasDirs) { // only for directories | 1159 | if (hasDirs) { // only for directories | ||
1156 | sep = new KSeparator(Qt::Horizontal, d->m_frame); | 1160 | sep = new KSeparator(Qt::Horizontal, d->m_frame); | ||
1157 | grid->addWidget(sep, curRow, 0, 1, 3); | 1161 | grid->addWidget(sep, curRow, 0, 1, 3); | ||
1158 | ++curRow; | 1162 | ++curRow; | ||
▲ Show 20 Lines • Show All 2754 Lines • Show Last 20 Lines |