Fix #6865: [Tracker] Use default checkboxes for permissions
This commit is contained in:
@@ -135,7 +135,7 @@ FilePermissionsView::FilePermissionsView(BRect rect, Model* model)
|
|||||||
kVerticalSpacing = kRowLabelVerticalSpacing,
|
kVerticalSpacing = kRowLabelVerticalSpacing,
|
||||||
kCheckBoxWidth = 18, kCheckBoxHeight = 18;
|
kCheckBoxWidth = 18, kCheckBoxHeight = 18;
|
||||||
|
|
||||||
FocusCheckBox** checkBoxArray[3][3] = {
|
BCheckBox** checkBoxArray[3][3] = {
|
||||||
{
|
{
|
||||||
&fReadUserCheckBox,
|
&fReadUserCheckBox,
|
||||||
&fReadGroupCheckBox,
|
&fReadGroupCheckBox,
|
||||||
@@ -156,7 +156,7 @@ FilePermissionsView::FilePermissionsView(BRect rect, Model* model)
|
|||||||
for (int32 x = 0; x < 3; x++) {
|
for (int32 x = 0; x < 3; x++) {
|
||||||
for (int32 y = 0; y < 3; y++) {
|
for (int32 y = 0; y < 3; y++) {
|
||||||
*checkBoxArray[y][x] =
|
*checkBoxArray[y][x] =
|
||||||
new FocusCheckBox(BRect(kLeftMargin + kHorizontalSpacing * x,
|
new BCheckBox(BRect(kLeftMargin + kHorizontalSpacing * x,
|
||||||
kTopMargin + kVerticalSpacing * y,
|
kTopMargin + kVerticalSpacing * y,
|
||||||
kLeftMargin + kHorizontalSpacing * x + kCheckBoxWidth,
|
kLeftMargin + kHorizontalSpacing * x + kCheckBoxWidth,
|
||||||
kTopMargin + kVerticalSpacing * y + kCheckBoxHeight),
|
kTopMargin + kVerticalSpacing * y + kCheckBoxHeight),
|
||||||
|
|||||||
@@ -43,25 +43,6 @@ All rights reserved.
|
|||||||
|
|
||||||
namespace BPrivate {
|
namespace BPrivate {
|
||||||
|
|
||||||
class FocusCheckBox : public BCheckBox {
|
|
||||||
public:
|
|
||||||
FocusCheckBox(BRect rect, const char* name, const char* label,
|
|
||||||
BMessage* message)
|
|
||||||
: BCheckBox(rect, name, label, message)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void Draw(BRect rect)
|
|
||||||
{
|
|
||||||
BCheckBox::Draw(rect);
|
|
||||||
|
|
||||||
if (IsFocus()) {
|
|
||||||
SetHighColor(0, 0, 255);
|
|
||||||
StrokeRect(BRect(2 , 4, 12, 14));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class FilePermissionsView : public BView {
|
class FilePermissionsView : public BView {
|
||||||
public:
|
public:
|
||||||
@@ -76,17 +57,17 @@ class FilePermissionsView : public BView {
|
|||||||
private:
|
private:
|
||||||
Model* fModel;
|
Model* fModel;
|
||||||
|
|
||||||
FocusCheckBox* fReadUserCheckBox;
|
BCheckBox* fReadUserCheckBox;
|
||||||
FocusCheckBox* fReadGroupCheckBox;
|
BCheckBox* fReadGroupCheckBox;
|
||||||
FocusCheckBox* fReadOtherCheckBox;
|
BCheckBox* fReadOtherCheckBox;
|
||||||
|
|
||||||
FocusCheckBox* fWriteUserCheckBox;
|
BCheckBox* fWriteUserCheckBox;
|
||||||
FocusCheckBox* fWriteGroupCheckBox;
|
BCheckBox* fWriteGroupCheckBox;
|
||||||
FocusCheckBox* fWriteOtherCheckBox;
|
BCheckBox* fWriteOtherCheckBox;
|
||||||
|
|
||||||
FocusCheckBox* fExecuteUserCheckBox;
|
BCheckBox* fExecuteUserCheckBox;
|
||||||
FocusCheckBox* fExecuteGroupCheckBox;
|
BCheckBox* fExecuteGroupCheckBox;
|
||||||
FocusCheckBox* fExecuteOtherCheckBox;
|
BCheckBox* fExecuteOtherCheckBox;
|
||||||
|
|
||||||
BTextControl* fOwnerTextControl;
|
BTextControl* fOwnerTextControl;
|
||||||
BTextControl* fGroupTextControl;
|
BTextControl* fGroupTextControl;
|
||||||
|
|||||||
Reference in New Issue
Block a user