The Gemara at the end of Makkos, daf 24a,
is the first written source of the age-old knowledge that there are 613 mitzvos in the Torah. The gemara goes on to discuss how King David listed 11 leading virtues to focus on in order to help one follow the Torah. Micha reduced it to 3 leading virtues as the gemara states: “Micha came and reduced them to three [principles], as it is written, ‘It has been told to you, O man, what is good, and what the Lord has require of you:  only to do justly, and  to love mercy and  to walk humbly before Hashem.’ ‘To do justly,’ that is, maintaining justice; and to love mercy,’ that is, rendering every kind office; ‘and walking modestly before your God,’ that is, walking in funeral and bridal processions. And do not these facts warrant an a fortiori (kal vachomer) conclusion that if in matters that are not generally performed in private the Torah enjoins ‘walking modestly,’ is it not ever so much more requisite in matters that usually call for modesty?” (Click here
for Hebrew text.)
The attribute of modesty which Micha has as his third virtue, says the Maalos HaMiddos, is one of the most important and virtuous attributes one can attain. This is demonstrated by the fact that it was one of the three virtues listed by Micha. Not only that, but it also protects a person from the evil eye, and saves a person from sin (Maalos HaMiddos, in the beginning of the Attribute of Modesty).
These three virtues in Micha are mentioned in the last pasuk of this week’s Haftorah for the Torah portion of Balak. In the Haftorah, we find that Hashem is very upset at His people for straying from Him, but has not totally given up on them. Indeed, he gives them these three virtues to focus on in order to rebound, namely: “He has told you, O man, what is good, and what the Lord demands of you; but to do justice, to love loving-kindness, and to walk discreetly with your G-d” (Micha 6:8). Click here and here for Hebrew text.)
Rashi there says, in his second interpretation: “Another explanation: ‘And walk discreetly.’ The standard of flesh and blood is not like the standard of the Holy One, Blessed Be He. The Standard of flesh and blood is: If one man embarrasses his fellow and comes to placate him, the fellow says to him, ‘I will not accept your apology until so and so and so and so, before whom you disgraced me, come.’ But the Holy One Blessed Be He, desires only that the man's return to Him be between the two of them (based on a Pesikta d'Rav Kahana 163b).”
Rashi is trying to explain the third virtue of “walking discreetly,” which normally means to be modest, and how it fits, in context, with the flow of the Navi.
However, what does accepting an apology in private have to do with modesty? It fits better with the lesson of not bearing a grudge or not taking revenge, as the emphasis seems to be not to embarrass the one who is apologizing. So what does this have to do with modesty, which normally means to do things in a manner which does not garner any, or at least minimal, attention to oneself?
Elsewhere, in the Maalos HaMiddos, it says: “They asked a wise man what is modesty, and he answered one should always ascribe to the Torah, take care of his monetary business, do what he is obligated to do, and act with humility when observing the Torah, wisdom, acting properly, how one eats, and deals with harsh circumstances. Someone else said modesty is distancing oneself from sin because a person is not modest if his ‘clothes’ aren’t white… Included in the ways of modesty is being a giving person, and accepting loved ones with a smile in a joyous fashion, showing them love, fulfilling what they desire, and feeling their pain.” Click here and here for Hebrew text.)
What does all this have to do with modesty? On the contrary, smiling and showing emotion could attract more attention? Revolving one’s life around the Torah and having honest business dealings is fundamental to truth and doing Hashem’s will; what does that have to do with modesty?
It would seem from this Rashi and Maalos HaMiddos that the proper definition of modesty is doing what is right for the sake of what is right whether anyone is watching or not. When one steps over the line and does something inappropriate like trying to embarrass the person who is asking forgiveness and repenting, or one who looks and feels sad around loved ones for no apparent reason, or dishonest business, or a lack of humility, all are signs of immodesty which just happens to attract more attention than just doing the right thing.